#include <bits/stdc++.h>
using namespace std;
int main()
{
int n,cnt=0; cin>>n;
vector<bool> vanbenne(26);
while(n--)
{
char c; cin>>c;
c=='_' ? cnt++ : vanbenne[c-'A']=true;
}
int mo=1,db=0;
for(int i:vanbenne)
if(!i) db++;
while(cnt--)
{
mo*=db;
db--;
}
cout<<mo<<endl;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1808 KiB | ||||
2 | Accepted | 3ms | 2008 KiB | ||||
subtask2 | 10/10 | ||||||
3 | Accepted | 3ms | 2240 KiB | ||||
4 | Accepted | 3ms | 2424 KiB | ||||
5 | Accepted | 3ms | 2632 KiB | ||||
subtask3 | 20/20 | ||||||
6 | Accepted | 3ms | 2852 KiB | ||||
7 | Accepted | 3ms | 3100 KiB | ||||
8 | Accepted | 2ms | 3176 KiB | ||||
9 | Accepted | 3ms | 3308 KiB | ||||
10 | Accepted | 3ms | 3552 KiB | ||||
11 | Accepted | 2ms | 3604 KiB | ||||
subtask4 | 30/30 | ||||||
12 | Accepted | 3ms | 3748 KiB | ||||
13 | Accepted | 2ms | 3672 KiB | ||||
14 | Accepted | 2ms | 3672 KiB | ||||
15 | Accepted | 2ms | 3676 KiB | ||||
16 | Accepted | 2ms | 3772 KiB | ||||
17 | Accepted | 3ms | 3888 KiB | ||||
subtask5 | 40/40 | ||||||
18 | Accepted | 2ms | 3888 KiB | ||||
19 | Accepted | 2ms | 4004 KiB | ||||
20 | Accepted | 3ms | 4128 KiB | ||||
21 | Accepted | 2ms | 4100 KiB | ||||
22 | Accepted | 3ms | 4232 KiB | ||||
23 | Accepted | 3ms | 4308 KiB | ||||
24 | Accepted | 3ms | 4284 KiB |