78372024-01-11 12:39:34rancealexkriszBimmbamm (30)cpp17Accepted 30/303ms3440 KiB
#include <iostream>

using namespace std;

int main()
{
    int n,db=0;
    cin>>n;
    for(int i=1;i<=n and db==0;i++)
    {
        string x,y;
        cin>>x;
        if(i%3==0 and i%5==0) y="BUMM";
        else
            {
            if(i%3==0) y="BIMM";
        else
            {
            if(i%5==0) y="BAMM";
        else y="SZAM";
        }
        }

        if(x!=y) db=i;
    }
    cout<<db;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base30/30
1Accepted0/03ms1812 KiB
2Accepted0/03ms2008 KiB
3Accepted3/33ms2220 KiB
4Accepted3/33ms2456 KiB
5Accepted3/32ms2380 KiB
6Accepted3/33ms2504 KiB
7Accepted3/33ms2592 KiB
8Accepted3/33ms2712 KiB
9Accepted3/33ms2852 KiB
10Accepted3/33ms3196 KiB
11Accepted3/33ms3376 KiB
12Accepted3/33ms3440 KiB