75472024-01-09 14:00:50szabelrBimmbamm (30)cpp17Wrong answer 0/303ms3520 KiB
#include <iostream>

using namespace std;

int main()
{
    int n,hol=1,rossz;
    cin>>n;
    string x;
    for(int i=1; i<=n; i++){
        cin>>x;
        if(hol%3!= 0 and hol%5!=0 and x=="BIMM")
            rossz=i+1;
        if(hol%3!= 0 and hol%5!=0 and x=="BUMM")
            rossz=i+1;
        if(hol%3!= 0 and hol%5!=0 and x=="BAMM")
            rossz=i+1;
        if(hol%3!= 0 and hol%5!=0 and x=="BAMM")
            rossz=i+1;
        if(hol%3== 0 and hol%5!=0 and x=="BUMM")
            rossz=i+1;
        if(hol%3== 0 and hol%5!=0 and x=="BAMM")
            rossz=i+1;
        if(hol%3!= 0 and hol%5==0 and x=="BIMM")
            rossz=i+1;
        if(hol%3!= 0 and hol%5==0 and x=="BUMM")
            rossz=i+1;
        if(hol%3== 0 and hol%5==0 and x=="BIMM")
            rossz=i+1;
        if(hol%3== 0 and hol%5==0 and x=="BAMM")
            rossz=i+1;
    }
    cout<<rossz-1;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base0/30
1Accepted0/03ms1812 KiB
2Wrong answer0/03ms2056 KiB
3Wrong answer0/33ms2380 KiB
4Wrong answer0/33ms2476 KiB
5Wrong answer0/33ms2472 KiB
6Wrong answer0/33ms2468 KiB
7Wrong answer0/33ms2600 KiB
8Wrong answer0/33ms2960 KiB
9Wrong answer0/33ms3052 KiB
10Wrong answer0/33ms3392 KiB
11Wrong answer0/33ms3520 KiB
12Wrong answer0/33ms3440 KiB