18132022-12-03 21:46:15kdbSzózatcpp11Accepted 100/1003ms4040 KiB
#include <iostream>
#include <vector>
#include <map>
#include <queue>
using namespace std;
#define ll long long

ostream& operator<<(ostream& os, vector<int>& input)
{
    for (auto i : input)
    {
        os << i << " ";
    }
    return os;
}

int main()
{
    cin.tie(nullptr);
    cout.tie(nullptr);
    ios_base::sync_with_stdio(false);
    int n, m = 0, q = 1;
    cin >> n;
    for (size_t i = 0; i < n; i++)
    {
        char a;
        cin >> a;
        if (a == '_') m++;
    }
    for (size_t i = m; i > 0; i--)
    {
        q *= 26 - n + i;
    }
    cout << q << endl;
    return 0;
}
/*
5
H O U S _
-22

3
A _ _
-600
*/
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1892 KiB
2Accepted2ms2400 KiB
subtask210/10
3Accepted2ms2368 KiB
4Accepted2ms2528 KiB
5Accepted2ms2756 KiB
subtask320/20
6Accepted2ms2960 KiB
7Accepted2ms3036 KiB
8Accepted2ms3048 KiB
9Accepted2ms3244 KiB
10Accepted2ms3136 KiB
11Accepted2ms3136 KiB
subtask430/30
12Accepted2ms3100 KiB
13Accepted2ms3200 KiB
14Accepted2ms3200 KiB
15Accepted2ms3424 KiB
16Accepted2ms3432 KiB
17Accepted2ms3500 KiB
subtask540/40
18Accepted2ms3536 KiB
19Accepted2ms3612 KiB
20Accepted2ms3712 KiB
21Accepted2ms3864 KiB
22Accepted2ms3976 KiB
23Accepted2ms4036 KiB
24Accepted2ms4040 KiB