136152025-01-08 11:25:02kongopongBimmbamm (30)cpp17Wrong answer 0/301ms316 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;
            felt = 1;
        }
        else
        {
            if(i%3==0 && x!="BIMM")
            {
                cout << i;
                felt = 1;
            }
            else
                if(i%5==0 && x!="BAMM")
            {
                cout << i;
                felt = 1;
            }
            else
                if(x!="SZAM" && i%3!=0 && i%5!=0){
                    cout << i;
                    felt = 1;
                }


        }
    }
    if(!felt)
        cout << 0;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base0/30
1Accepted0/01ms316 KiB
2Wrong answer0/01ms316 KiB
3Wrong answer0/31ms316 KiB
4Wrong answer0/31ms316 KiB
5Wrong answer0/31ms316 KiB
6Wrong answer0/31ms316 KiB
7Wrong answer0/31ms316 KiB
8Wrong answer0/31ms316 KiB
9Wrong answer0/31ms316 KiB
10Wrong answer0/31ms316 KiB
11Wrong answer0/31ms316 KiB
12Wrong answer0/31ms316 KiB