17142022-12-01 16:32:33PalotásMártonSzózatcpp14Wrong answer 30/1003ms4308 KiB
#include <iostream>
#include <string>

using namespace std;

int main()
{
    int n,i,s=0,m=1;
    cin>>n;
    char x;
    cin>>x;
    string t;
    getline(cin,t);
    for(i=0;i<=t.length();i++){
        x=t[i];
        if(x=='_'){
            s++;
        }
    }
    n=26-(n-s);
    //cout<<s<<n<<"dasds";
    for(i=0;i<s;i++){
        m=m*n;
        n--;
    }
    cout<<m;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1808 KiB
2Accepted2ms2000 KiB
subtask210/10
3Accepted2ms2204 KiB
4Accepted2ms2280 KiB
5Accepted2ms2432 KiB
subtask320/20
6Accepted2ms2484 KiB
7Accepted2ms2736 KiB
8Accepted2ms2812 KiB
9Accepted2ms2944 KiB
10Accepted2ms3184 KiB
11Accepted2ms3392 KiB
subtask40/30
12Accepted2ms3548 KiB
13Wrong answer2ms3672 KiB
14Accepted2ms3672 KiB
15Accepted2ms3668 KiB
16Accepted2ms3788 KiB
17Wrong answer2ms3752 KiB
subtask50/40
18Accepted2ms3712 KiB
19Wrong answer2ms3828 KiB
20Wrong answer2ms3852 KiB
21Wrong answer2ms3928 KiB
22Wrong answer2ms3940 KiB
23Wrong answer2ms4192 KiB
24Wrong answer2ms4308 KiB