16402022-12-01 08:58:24TimiSzózatcpp11Wrong answer 0/1003ms4676 KiB
#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;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Wrong answer3ms1812 KiB
2Accepted2ms2052 KiB
subtask20/10
3Wrong answer2ms2300 KiB
4Wrong answer2ms2508 KiB
5Wrong answer2ms2696 KiB
subtask30/20
6Wrong answer2ms2736 KiB
7Wrong answer2ms2932 KiB
8Wrong answer2ms2896 KiB
9Wrong answer2ms3024 KiB
10Wrong answer2ms3136 KiB
11Wrong answer2ms3284 KiB
subtask40/30
12Wrong answer2ms3404 KiB
13Wrong answer2ms3380 KiB
14Wrong answer2ms3628 KiB
15Wrong answer2ms3700 KiB
16Wrong answer2ms3700 KiB
17Wrong answer2ms3716 KiB
subtask50/40
18Accepted2ms3956 KiB
19Wrong answer2ms4152 KiB
20Wrong answer2ms4192 KiB
21Wrong answer2ms4324 KiB
22Wrong answer2ms4532 KiB
23Wrong answer2ms4608 KiB
24Wrong answer2ms4676 KiB