#include <iostream>
#include <set>
using namespace std;
int main()
{
int N, i, ures,betu;
long long int megoldas=0;
string s;
cin>>N>>s;
set<char> halmaz;
for (i=0; i<N; i++)
{
if ((s[i]>='A')&&(s[i]<='Z'))
halmaz.insert(s[i]);
}
ures=N-halmaz.size();
betu=26-halmaz.size();
if (ures>0)
{
megoldas=1;
for (i=1;i<=ures; i++)
{
megoldas*=betu;
betu--;
}
}
cout<<megoldas;
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Wrong answer | 3ms | 1812 KiB | ||||
2 | Accepted | 2ms | 2052 KiB | ||||
subtask2 | 0/10 | ||||||
3 | Wrong answer | 2ms | 2300 KiB | ||||
4 | Wrong answer | 2ms | 2508 KiB | ||||
5 | Wrong answer | 2ms | 2696 KiB | ||||
subtask3 | 0/20 | ||||||
6 | Wrong answer | 2ms | 2736 KiB | ||||
7 | Wrong answer | 2ms | 2932 KiB | ||||
8 | Wrong answer | 2ms | 2896 KiB | ||||
9 | Wrong answer | 2ms | 3024 KiB | ||||
10 | Wrong answer | 2ms | 3136 KiB | ||||
11 | Wrong answer | 2ms | 3284 KiB | ||||
subtask4 | 0/30 | ||||||
12 | Wrong answer | 2ms | 3404 KiB | ||||
13 | Wrong answer | 2ms | 3380 KiB | ||||
14 | Wrong answer | 2ms | 3628 KiB | ||||
15 | Wrong answer | 2ms | 3700 KiB | ||||
16 | Wrong answer | 2ms | 3700 KiB | ||||
17 | Wrong answer | 2ms | 3716 KiB | ||||
subtask5 | 0/40 | ||||||
18 | Accepted | 2ms | 3956 KiB | ||||
19 | Wrong answer | 2ms | 4152 KiB | ||||
20 | Wrong answer | 2ms | 4192 KiB | ||||
21 | Wrong answer | 2ms | 4324 KiB | ||||
22 | Wrong answer | 2ms | 4532 KiB | ||||
23 | Wrong answer | 2ms | 4608 KiB | ||||
24 | Wrong answer | 2ms | 4676 KiB |