#include <iostream>
#include <set>
using namespace std;
int main()
{
int N, i, ures,betu;
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 | 2056 KiB | ||||
subtask2 | 0/10 | ||||||
3 | Wrong answer | 2ms | 2304 KiB | ||||
4 | Wrong answer | 2ms | 2460 KiB | ||||
5 | Wrong answer | 2ms | 2660 KiB | ||||
subtask3 | 0/20 | ||||||
6 | Wrong answer | 2ms | 2868 KiB | ||||
7 | Wrong answer | 2ms | 3024 KiB | ||||
8 | Wrong answer | 2ms | 3100 KiB | ||||
9 | Wrong answer | 2ms | 3348 KiB | ||||
10 | Wrong answer | 2ms | 3424 KiB | ||||
11 | Wrong answer | 2ms | 3424 KiB | ||||
subtask4 | 0/30 | ||||||
12 | Wrong answer | 2ms | 3420 KiB | ||||
13 | Wrong answer | 2ms | 3536 KiB | ||||
14 | Wrong answer | 2ms | 3536 KiB | ||||
15 | Wrong answer | 2ms | 3424 KiB | ||||
16 | Wrong answer | 2ms | 3336 KiB | ||||
17 | Wrong answer | 2ms | 3404 KiB | ||||
subtask5 | 0/40 | ||||||
18 | Accepted | 2ms | 3532 KiB | ||||
19 | Wrong answer | 2ms | 3756 KiB | ||||
20 | Wrong answer | 2ms | 3896 KiB | ||||
21 | Wrong answer | 2ms | 4092 KiB | ||||
22 | Wrong answer | 2ms | 4228 KiB | ||||
23 | Wrong answer | 2ms | 4260 KiB | ||||
24 | Wrong answer | 2ms | 4268 KiB |