136162025-01-08 11:25:37kongopongBimmbamm (30)cpp17Wrong answer 3/301ms500 KiB
#include <iostream>
#include <string>

using namespace std;

int main()
{
    int n;
    cin >> n;
    string x;
    bool felt=0;
    for(int i=1; i<=n; i++){
        cin >> x;
        if(i%3==0 && i%5==0 && x!="BUMM")
        {
            cout << i;
            return 0;
        }
        else
        {
            if(i%3==0 && x!="BIMM")
            {
                cout << i;
                return 0;
            }
            else
                if(i%5==0 && x!="BAMM")
            {
                cout << i;
                return 0;
            }
            else
                if(x!="SZAM" && i%3!=0 && i%5!=0){
                    cout << i;
                    return 0;
                }


        }
    }
    cout << 0;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base3/30
1Accepted0/01ms328 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/31ms316 KiB
11Wrong answer0/31ms316 KiB
12Wrong answer0/31ms316 KiB