75482024-01-09 14:01:34szabelrBimmbamm (30)cpp17Wrong answer 0/303ms2856 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/03ms2052 KiB
3Wrong answer0/33ms2140 KiB
4Wrong answer0/33ms2212 KiB
5Wrong answer0/33ms2424 KiB
6Wrong answer0/33ms2636 KiB
7Wrong answer0/33ms2720 KiB
8Wrong answer0/33ms2720 KiB
9Wrong answer0/33ms2720 KiB
10Wrong answer0/33ms2720 KiB
11Wrong answer0/33ms2724 KiB
12Wrong answer0/33ms2856 KiB