33462023-02-26 22:11:26nkdorka1212Bimmbamm (30)cpp17Wrong answer 3/303ms3488 KiB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    cin>>n;
    int ront=0;
    for(int i=1;i<=n;i++)
    {
        string s;
        cin>>s;
        if(i%3==0 && i%5==0 && s!="BUMM" && ront==0)
        {
            ront=i;
        }else if(i%3==0 && i%5!=0 && s!="BIMM" && ront==0)
        {
            ront=i;
        }else if(i%3!=0 && i%5==0 && s!="BUMM" && ront==0)
        {
            ront=i;
        }else if(i%3!=0 && i%5!=0 && s!="SZAM" && ront==0)
        {
            ront=i;
        }
    }
        cout<<ront<<"\n";

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base3/30
1Accepted0/03ms1812 KiB
2Wrong answer0/03ms1900 KiB
3Wrong answer0/33ms2108 KiB
4Wrong answer0/33ms2344 KiB
5Accepted3/33ms2428 KiB
6Wrong answer0/33ms2528 KiB
7Wrong answer0/33ms2740 KiB
8Wrong answer0/33ms2984 KiB
9Wrong answer0/33ms3036 KiB
10Wrong answer0/33ms3284 KiB
11Wrong answer0/33ms3376 KiB
12Wrong answer0/33ms3488 KiB