125472024-12-21 18:04:31MrkzBimmbamm (30)cpp17Wrong answer 0/301ms508 KiB
#include <iostream>
#include <cstring>
#include <fstream>
using namespace std;
char a[1000];
int megoldas,n;
int main()
{
    ifstream f("be.in");
    f>>n;
    for(int i=1;i<=n;i++){
        f>>a;
        if(i%3==0 && i%5!=0 && strstr(a,"BIMM")==NULL && megoldas==0)
            megoldas=i;
        else if(i%3!=0 && i%5==0 && strstr(a,"BAMM")==NULL && megoldas==0)
            megoldas=i;
        else if(i%3==0 && i%5==0 && strstr(a,"BUMM")==NULL && megoldas==0)
            megoldas=i;
        else if(i%3!=0 && i%5!=0 && strstr(a,"SZAM")==NULL && megoldas==0)
            megoldas=i;
    }
    cout<<megoldas;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base0/30
1Wrong answer0/01ms508 KiB
2Wrong answer0/01ms320 KiB
3Wrong answer0/31ms500 KiB
4Wrong answer0/31ms320 KiB
5Wrong answer0/31ms320 KiB
6Wrong answer0/31ms320 KiB
7Wrong answer0/31ms320 KiB
8Wrong answer0/31ms320 KiB
9Wrong answer0/31ms320 KiB
10Wrong answer0/31ms320 KiB
11Wrong answer0/31ms320 KiB
12Wrong answer0/31ms320 KiB