233602026-01-20 18:46:25ProgramozoRokaBimmbamm (30)cpp17Wrong answer 3/301ms500 KiB
#include <iostream>

using namespace std;

int f(int i)
{
    cout<<i;
    return 0;
}

int main()
{
    int n;
    cin>>n;
    for(int i=1;i<=n;++i)
    {
        string s;
        cin>>s;
        if(s=="SZAM" and (i%3==0 or i%5==0)) return f(i);
        if(s=="BIMM" and i%3!=0) return f(i);
        if(s=="BAMM" and i%5!=0) return f(i);
        if(s=="BIMM" and (i%3!=0 or i%5!=0)) return f(i);
    }

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base3/30
1Wrong answer0/01ms500 KiB
2Wrong answer0/01ms316 KiB
3Wrong answer0/31ms316 KiB
4Wrong answer0/31ms316 KiB
5Accepted3/31ms316 KiB
6Wrong answer0/31ms316 KiB
7Wrong answer0/31ms316 KiB
8Wrong answer0/31ms316 KiB
9Wrong answer0/31ms500 KiB
10Wrong answer0/31ms500 KiB
11Wrong answer0/31ms500 KiB
12Wrong answer0/31ms316 KiB