231302026-01-16 12:56:26zoMorze (60 pont)cpp17Wrong answer 0/601ms560 KiB
#include <iostream>

using namespace std;

int main()
{

    int i, n;
    cin>>n;
    string t;
    for (i=1; i<=n; i++)
    {
        //getline(cin, s);
        cin>>t;
        if (i%3!=0 and i%5!=0)
        {
            if (t!="SZAM")
            {
                cout << i<<endl;
                return 0;
            }
        }
        else if (i%3==0 and i%5==0)
        {
            if (t!="BUMM")
            {
                cout << i<<endl;
                return 0;
            }
        }
        else if (i%3==0)
        {
            if (t!="BIMM")
            {
                cout << i<<endl;
                return 0;
            }
        }
        else if (i%5==0)
        {
            if (t!="BAMM")
            {
                cout<<i<<endl;
                return 0;
            }
        }







    /*int i,n;
    cin>>n;
    string t[n];
    for (i=1; i<n; i++)
    {
        cout <<t[n]<<endl;
        if (i%3==0 and i%5==0)
        {
            if (i)
        }
        else if (i%3==0)
        {
            cout<<"BIMM"<<endl;
        }
        else if (i%5==0)
        {
            cout<<"BAMM"<<endl;
        }
        else if (i%3!=0 and i%5!=0)
        {
            cout<<i<<endl;
        }*/

    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base0/60
1Wrong answer0/01ms316 KiB
2Wrong answer0/01ms316 KiB
3Wrong answer0/31ms508 KiB
4Wrong answer0/31ms508 KiB
5Wrong answer0/31ms316 KiB
6Wrong answer0/31ms316 KiB
7Wrong answer0/31ms316 KiB
8Wrong answer0/31ms508 KiB
9Wrong answer0/41ms316 KiB
10Wrong answer0/41ms316 KiB
11Wrong answer0/41ms368 KiB
12Wrong answer0/71ms560 KiB
13Wrong answer0/71ms316 KiB
14Wrong answer0/81ms316 KiB
15Wrong answer0/81ms316 KiB