122882024-12-11 12:35:50KissCsongor777Bimmbamm (30)cpp17Accepted 30/301ms556 KiB
#include <iostream>

using namespace std;

int main()
{
    int n,a=0;
    cin>>n;
    string x,y;
    bool van=false;
    for(int i=1; i<=n && !van ; i++)
    {
        cin>>x;
        if(i%3==0)
            if(i%5==0)y="BUMM";
            else y="BIMM";
        else if(i%5==0)y="BAMM";
            else y="SZAM";
        if(x!=y){a=i;van=true;}
    }
    cout<<a;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base30/30
1Accepted0/01ms320 KiB
2Accepted0/01ms320 KiB
3Accepted3/31ms500 KiB
4Accepted3/31ms320 KiB
5Accepted3/31ms320 KiB
6Accepted3/31ms536 KiB
7Accepted3/31ms400 KiB
8Accepted3/31ms548 KiB
9Accepted3/31ms320 KiB
10Accepted3/31ms320 KiB
11Accepted3/31ms320 KiB
12Accepted3/31ms556 KiB