16392022-12-01 08:57:18TimiSzózatcpp11Wrong answer 0/1003ms4268 KiB
#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;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Wrong answer3ms1812 KiB
2Accepted2ms2056 KiB
subtask20/10
3Wrong answer2ms2304 KiB
4Wrong answer2ms2460 KiB
5Wrong answer2ms2660 KiB
subtask30/20
6Wrong answer2ms2868 KiB
7Wrong answer2ms3024 KiB
8Wrong answer2ms3100 KiB
9Wrong answer2ms3348 KiB
10Wrong answer2ms3424 KiB
11Wrong answer2ms3424 KiB
subtask40/30
12Wrong answer2ms3420 KiB
13Wrong answer2ms3536 KiB
14Wrong answer2ms3536 KiB
15Wrong answer2ms3424 KiB
16Wrong answer2ms3336 KiB
17Wrong answer2ms3404 KiB
subtask50/40
18Accepted2ms3532 KiB
19Wrong answer2ms3756 KiB
20Wrong answer2ms3896 KiB
21Wrong answer2ms4092 KiB
22Wrong answer2ms4228 KiB
23Wrong answer2ms4260 KiB
24Wrong answer2ms4268 KiB