#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
int factorial(int num)
{
return num == 1 ? 1 : num * factorial(num - 1);
}
int main()
{
int wordlength;
scanf("%d\n", &wordlength);
int db = 0;
char c;
while(true)
{
scanf("%c", &c);
if (c == '_')
{
db++;
}
if (c == '\n') break;
}
int sol = 1;
for (int i = 26 - wordlength + 1; i <= 26 - (wordlength - db); i++) {
sol *= i;
}
printf("%d", sol);
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Time limit exceeded | 1.057s | 1624 KiB | ||||
2 | Time limit exceeded | 1.067s | 1600 KiB | ||||
subtask2 | 10/10 | ||||||
3 | Accepted | 2ms | 1872 KiB | ||||
4 | Accepted | 2ms | 2032 KiB | ||||
5 | Accepted | 2ms | 2076 KiB | ||||
subtask3 | 20/20 | ||||||
6 | Accepted | 2ms | 2304 KiB | ||||
7 | Accepted | 2ms | 2156 KiB | ||||
8 | Accepted | 2ms | 2380 KiB | ||||
9 | Accepted | 2ms | 2588 KiB | ||||
10 | Accepted | 2ms | 2912 KiB | ||||
11 | Accepted | 2ms | 2988 KiB | ||||
subtask4 | 30/30 | ||||||
12 | Accepted | 2ms | 3252 KiB | ||||
13 | Accepted | 2ms | 3056 KiB | ||||
14 | Accepted | 2ms | 3288 KiB | ||||
15 | Accepted | 2ms | 3588 KiB | ||||
16 | Accepted | 2ms | 3820 KiB | ||||
17 | Accepted | 2ms | 3824 KiB | ||||
subtask5 | 40/40 | ||||||
18 | Accepted | 2ms | 3768 KiB | ||||
19 | Accepted | 2ms | 3696 KiB | ||||
20 | Accepted | 2ms | 3784 KiB | ||||
21 | Accepted | 2ms | 4128 KiB | ||||
22 | Accepted | 2ms | 3988 KiB | ||||
23 | Accepted | 2ms | 4324 KiB | ||||
24 | Accepted | 2ms | 4192 KiB |