72442024-01-05 11:00:19eduka78Bimmbamm (30)cpp17Accepted 30/303ms3412 KiB
#include <iostream>
#include <string>
using namespace std;

int main()
{
    int n, i, d=0;
    string a, el;
    cin>>n;
    for(i=1;i<=n;i++){
        cin>>a;
        if(i%3==0&&i%5==0)el="BUMM";
        else if(i%5==0)el="BAMM";
        else if(i%3==0)el="BIMM";
        else el="SZAM";
        if(a!=el){cout<<i<<endl;i=n+1;d=1;}
    }
    if(d==0)cout<<0<<endl;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base30/30
1Accepted0/03ms1812 KiB
2Accepted0/03ms2008 KiB
3Accepted3/33ms2104 KiB
4Accepted3/33ms2340 KiB
5Accepted3/33ms2580 KiB
6Accepted3/33ms2796 KiB
7Accepted3/33ms3040 KiB
8Accepted3/33ms3112 KiB
9Accepted3/33ms3156 KiB
10Accepted3/33ms3236 KiB
11Accepted3/33ms3248 KiB
12Accepted3/33ms3412 KiB