121902024-12-06 20:10:14szasztundeBimmbamm (30)cpp17Wrong answer 3/301ms520 KiB
#include <iostream>

using namespace std;

int main()
{
    int n;
    cin>>n;
    string x;
    bool ki=false;
    for(int i=1;i<=n && !ki;i++)
    {
        cin>>x;
        if (i%3==0 && i%5==0 && x!="BUMM")
        {
            cout<<i;
            ki=true;
        }
        else if(i%3==0 && x!="BIMM")
        {
            cout<<i;
            ki=true;
        }
        else if(i%5==0 && x!="BAMM")
        {
            cout<<i;
            ki=true;
        }
        else if(i%3!=0 && i%5!=0 && x!="SZAM")
        {
            cout<<i;
            ki=true;
        }
    }
    if (!ki) cout<<0;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base3/30
1Accepted0/01ms320 KiB
2Wrong answer0/01ms320 KiB
3Wrong answer0/31ms320 KiB
4Wrong answer0/31ms320 KiB
5Accepted3/31ms392 KiB
6Wrong answer0/31ms320 KiB
7Wrong answer0/31ms320 KiB
8Wrong answer0/31ms520 KiB
9Wrong answer0/31ms320 KiB
10Wrong answer0/31ms320 KiB
11Wrong answer0/31ms320 KiB
12Wrong answer0/31ms320 KiB