76892024-01-10 13:20:03szabelrBimmbamm (30)cpp17Wrong answer 15/303ms3420 KiB
#include <iostream>

using namespace std;

int main()
{
    int n, hol = 1, rossz=0,cucc=1;
    cin >> n;
    string x;
    for (int i = 1; i <= n and cucc==1; i++) {
        cin >> x;
        if (hol % 3 != 0 and hol % 5 != 0 and x == "BIMM")
        {
            cout << i;
            cucc = 0;
        }
        
        if (hol % 3 != 0 and hol % 5 != 0 and x == "BUMM")
        {
            cout << i;
            cucc = 0;
        }
        if (hol % 3 != 0 and hol % 5 != 0 and x == "BAMM")
        {
            cout << i;
            cucc = 0;
        }
        if (hol % 3 != 0 and hol % 5 != 0 and x == "BAMM")
        {
            cout << i;
            cucc = 0;
        }
        if (hol % 3 == 0 and hol % 5 != 0 and x == "BUMM")
        {
            cout << i;
            cucc = 0;
        }
        if (hol % 3 == 0 and hol % 5 != 0 and x == "BAMM")
        {
            cout << i;
            cucc = 0;
        }
        if (hol % 3 != 0 and hol % 5 == 0 and x == "BIMM")
        {
            cout << rossz;
            cucc = 0;
        }
        if (hol % 3 != 0 and hol % 5 == 0 and x == "BUMM")
        {
            cout << i;
            cucc = 0;
        }
        if (hol % 3 == 0 and hol % 5 == 0 and x == "BIMM")
        {
            cout << i;
            cucc = 0;
        }
        if (hol % 3 == 0 and hol % 5 == 0 and x == "BAMM")
        {
            cout << i;
            cucc = 0;
        }
        hol++;
    }
    //cout << rossz - 1;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base15/30
1Accepted0/03ms1812 KiB
2Accepted0/03ms2008 KiB
3Accepted3/33ms2216 KiB
4Accepted3/33ms2428 KiB
5Accepted3/33ms2904 KiB
6Wrong answer0/33ms3004 KiB
7Wrong answer0/33ms3144 KiB
8Accepted3/33ms3420 KiB
9Wrong answer0/33ms3356 KiB
10Wrong answer0/33ms3396 KiB
11Wrong answer0/33ms3392 KiB
12Accepted3/33ms3392 KiB