20122022-12-13 22:12:124bs0lute0Szózatcpp11Accepted 100/1003ms5144 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);
    for (int i = 1; i <= c; i++){
        value *= 26-n + i;
    }
    cout << value;
    system("pause");
    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1880 KiB
2Accepted2ms2208 KiB
subtask210/10
3Accepted2ms2568 KiB
4Accepted2ms2564 KiB
5Accepted2ms2444 KiB
subtask320/20
6Accepted2ms2772 KiB
7Accepted2ms2984 KiB
8Accepted2ms2980 KiB
9Accepted2ms3220 KiB
10Accepted2ms3580 KiB
11Accepted2ms3860 KiB
subtask430/30
12Accepted2ms4096 KiB
13Accepted2ms4084 KiB
14Accepted2ms4216 KiB
15Accepted2ms4316 KiB
16Accepted2ms4196 KiB
17Accepted2ms4452 KiB
subtask540/40
18Accepted2ms4668 KiB
19Accepted2ms4664 KiB
20Accepted2ms4668 KiB
21Accepted2ms4916 KiB
22Accepted2ms5044 KiB
23Accepted2ms5044 KiB
24Accepted2ms5144 KiB