16922022-12-01 15:50:06PalotásMártonSzózatcpp14Wrong answer 30/1003ms4088 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);
    for(i=0;i<s;i++){
        m=m*n;
        n--;
    }
    cout<<m;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1680 KiB
2Accepted2ms1928 KiB
subtask210/10
3Accepted2ms2180 KiB
4Accepted2ms2208 KiB
5Accepted2ms2464 KiB
subtask320/20
6Accepted2ms2532 KiB
7Accepted2ms2592 KiB
8Accepted2ms2800 KiB
9Accepted2ms2996 KiB
10Accepted2ms3084 KiB
11Accepted2ms3324 KiB
subtask40/30
12Accepted2ms3532 KiB
13Wrong answer2ms3612 KiB
14Accepted2ms3568 KiB
15Accepted2ms3696 KiB
16Accepted2ms3884 KiB
17Wrong answer2ms3992 KiB
subtask50/40
18Accepted2ms4088 KiB
19Wrong answer2ms4076 KiB
20Wrong answer2ms3956 KiB
21Wrong answer2ms3952 KiB
22Wrong answer2ms3952 KiB
23Wrong answer2ms4080 KiB
24Wrong answer2ms4076 KiB