18462022-12-05 08:12:17peterSzózatcpp17Time limit exceeded 100/1001.067s4324 KiB
#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;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Time limit exceeded1.057s1624 KiB
2Time limit exceeded1.067s1600 KiB
subtask210/10
3Accepted2ms1872 KiB
4Accepted2ms2032 KiB
5Accepted2ms2076 KiB
subtask320/20
6Accepted2ms2304 KiB
7Accepted2ms2156 KiB
8Accepted2ms2380 KiB
9Accepted2ms2588 KiB
10Accepted2ms2912 KiB
11Accepted2ms2988 KiB
subtask430/30
12Accepted2ms3252 KiB
13Accepted2ms3056 KiB
14Accepted2ms3288 KiB
15Accepted2ms3588 KiB
16Accepted2ms3820 KiB
17Accepted2ms3824 KiB
subtask540/40
18Accepted2ms3768 KiB
19Accepted2ms3696 KiB
20Accepted2ms3784 KiB
21Accepted2ms4128 KiB
22Accepted2ms3988 KiB
23Accepted2ms4324 KiB
24Accepted2ms4192 KiB