8052022-01-16 13:41:22HEBimmbamm (30)cpp11Wrong answer 3/302ms1964 KiB
#include <iostream>
//#include <fstream>

using namespace std;

//ifstream cin("bimbammbumm.in");
//ofstream cout("bimbammbumm.out");

int n,i;
string s;

int main()
{
    cin>>n;
    bool f=false;
    for(i=1;i<=n;++i)
    {
        cin>>s;
        if(i%3==0 && s!="BIMM")
        {
            cout<<i;
            f=true;
            break;
        }
        else if(i%5==0 && s!="BAMM")
        {
            cout<<i;
            f=true;
            break;
        }
        else if(i%5==0 && i%3==0 && s!="BUMM")
        {
            cout<<i;
            f=true;
            break;
        }
        else if(s!="SZAM" && (i%3!=0 && i%5!=0))
        {
            cout<<i;
            f=true;
            break;
        }
    }
    if(f==false)cout<<0;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base3/30
1Accepted0/02ms1820 KiB
2Wrong answer0/01ms1840 KiB
3Wrong answer0/31ms1908 KiB
4Wrong answer0/31ms1916 KiB
5Accepted3/31ms1916 KiB
6Wrong answer0/31ms1924 KiB
7Wrong answer0/31ms1932 KiB
8Wrong answer0/31ms1932 KiB
9Wrong answer0/31ms1944 KiB
10Wrong answer0/31ms1936 KiB
11Wrong answer0/31ms1956 KiB
12Wrong answer0/31ms1964 KiB