#include <iostream>
#include <vector>
#include <algorithm>
#include <climits>
#include <queue>
#include <set>
#include <map>
using namespace std;
using ll = long long;
signed main()
{
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
}
int n = 26;
ll ans = 1;
int m = 0;
int s;
cin >> s;
for (int i = 0; i < s; i++)
{
char next;
cin >> next;
if (next == '_')
{
m++;
}
else
{
n--;
}
}
for (int i = 0; i < m; i++)
{
ans *= n;
n--;
}
cout << ans << "\n";
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1896 KiB | ||||
2 | Accepted | 3ms | 2112 KiB | ||||
subtask2 | 10/10 | ||||||
3 | Accepted | 3ms | 2328 KiB | ||||
4 | Accepted | 3ms | 2408 KiB | ||||
5 | Accepted | 3ms | 2812 KiB | ||||
subtask3 | 20/20 | ||||||
6 | Accepted | 3ms | 2924 KiB | ||||
7 | Accepted | 2ms | 2900 KiB | ||||
8 | Accepted | 3ms | 2912 KiB | ||||
9 | Accepted | 2ms | 3004 KiB | ||||
10 | Accepted | 2ms | 3016 KiB | ||||
11 | Accepted | 2ms | 3124 KiB | ||||
subtask4 | 30/30 | ||||||
12 | Accepted | 3ms | 3252 KiB | ||||
13 | Accepted | 2ms | 3192 KiB | ||||
14 | Accepted | 2ms | 3192 KiB | ||||
15 | Accepted | 3ms | 3204 KiB | ||||
16 | Accepted | 3ms | 3216 KiB | ||||
17 | Accepted | 2ms | 3212 KiB | ||||
subtask5 | 40/40 | ||||||
18 | Accepted | 2ms | 3224 KiB | ||||
19 | Accepted | 3ms | 3352 KiB | ||||
20 | Accepted | 2ms | 3440 KiB | ||||
21 | Accepted | 3ms | 3440 KiB | ||||
22 | Accepted | 3ms | 3448 KiB | ||||
23 | Accepted | 3ms | 3452 KiB | ||||
24 | Accepted | 2ms | 3452 KiB |