20052022-12-13 21:52:354bs0lute0Szózatcpp11Wrong answer 30/1003ms5248 KiB
#include <iostream>
using namespace std;

int cw(char t[], int s){
    int count = 0;
    for (int i = 0; i < s; i++){
        if (t[i] == '_'){
            count++;
        }
    }
    return count;
}

int n;
int main(){
    cin >> n;
    char N[n];
    int value = 1;
    for (int i = 0; i < n; i++){
        cin >> N[i];
    }
    const int c = cw(N, n);
    value = 26 - (n-c);
    for (int i = c; i > 1; i--){
        value *= 26-i;
    }
    cout << value;
    system("pause");
    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1880 KiB
2Accepted2ms2068 KiB
subtask210/10
3Accepted2ms2304 KiB
4Accepted2ms2552 KiB
5Accepted2ms2904 KiB
subtask320/20
6Accepted2ms3032 KiB
7Accepted2ms3160 KiB
8Accepted2ms3396 KiB
9Accepted2ms3372 KiB
10Accepted2ms3724 KiB
11Accepted2ms3968 KiB
subtask40/30
12Accepted2ms3940 KiB
13Wrong answer2ms4284 KiB
14Accepted2ms4540 KiB
15Wrong answer2ms4756 KiB
16Accepted2ms4880 KiB
17Wrong answer2ms4880 KiB
subtask50/40
18Accepted2ms5140 KiB
19Accepted2ms5116 KiB
20Accepted2ms5248 KiB
21Wrong answer2ms5224 KiB
22Wrong answer2ms5228 KiB
23Accepted2ms5024 KiB
24Accepted2ms5128 KiB