18452022-12-05 08:05:10peterSzózatcpp17Wrong answer 0/1003ms3636 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);
    char* letters = (char*)malloc(sizeof(char) * (wordlength + 1));
    
    scanf("%s", letters);
    
    //fputs(letters, stdout);
    int db = 0;
    for (int i = 0; i < wordlength; i++)
    {
        if (letters[i] == '_')
        {
            db++;
        }
    }
    int sol = 1;
    for (int i = 26 - wordlength + 1; i <= 26 - (wordlength - db); i++) {
        sol *= i;
    }
    printf("%d", sol);


    free(letters);

    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Wrong answer3ms1164 KiB
2Wrong answer2ms1428 KiB
subtask20/10
3Wrong answer2ms1696 KiB
4Wrong answer2ms2176 KiB
5Wrong answer2ms2140 KiB
subtask30/20
6Wrong answer2ms2048 KiB
7Wrong answer2ms2148 KiB
8Wrong answer2ms2184 KiB
9Wrong answer2ms2244 KiB
10Wrong answer2ms2500 KiB
11Wrong answer2ms2632 KiB
subtask40/30
12Wrong answer2ms2608 KiB
13Wrong answer2ms2880 KiB
14Wrong answer2ms3084 KiB
15Wrong answer2ms3108 KiB
16Wrong answer2ms3336 KiB
17Wrong answer2ms3180 KiB
subtask50/40
18Wrong answer2ms3112 KiB
19Wrong answer2ms3128 KiB
20Wrong answer2ms3360 KiB
21Wrong answer2ms3340 KiB
22Wrong answer2ms3404 KiB
23Wrong answer2ms3636 KiB
24Wrong answer2ms3436 KiB