76902024-01-10 13:21:07szabelrBimmbamm (30)cpp17Wrong answer 18/303ms3708 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" and cucc==1)
        {
            cout << i;
            cucc = 0;
        }
        
        if (hol % 3 != 0 and hol % 5 != 0 and x == "BUMM" and cucc == 1)
        {
            cout << i;
            cucc = 0;
        }
        if (hol % 3 != 0 and hol % 5 != 0 and x == "BAMM" and cucc == 1)
        {
            cout << i;
            cucc = 0;
        }
        if (hol % 3 != 0 and hol % 5 != 0 and x == "BAMM" and cucc == 1)
        {
            cout << i;
            cucc = 0;
        }
        if (hol % 3 == 0 and hol % 5 != 0 and x == "BUMM" and cucc == 1)
        {
            cout << i;
            cucc = 0;
        }
        if (hol % 3 == 0 and hol % 5 != 0 and x == "BAMM" and cucc == 1)
        {
            cout << i;
            cucc = 0;
        }
        if (hol % 3 != 0 and hol % 5 == 0 and x == "BIMM" and cucc == 1)
        {
            cout << rossz;
            cucc = 0;
        }
        if (hol % 3 != 0 and hol % 5 == 0 and x == "BUMM" and cucc == 1)
        {
            cout << i;
            cucc = 0;
        }
        if (hol % 3 == 0 and hol % 5 == 0 and x == "BIMM" and cucc == 1)
        {
            cout << i;
            cucc = 0;
        }
        if (hol % 3 == 0 and hol % 5 == 0 and x == "BAMM" and cucc == 1)
        {
            cout << i;
            cucc = 0;
        }
        hol++;
    }
    //cout << rossz - 1;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base18/30
1Accepted0/03ms1808 KiB
2Accepted0/03ms2060 KiB
3Accepted3/33ms2276 KiB
4Accepted3/33ms2332 KiB
5Accepted3/33ms2524 KiB
6Wrong answer0/33ms2740 KiB
7Wrong answer0/33ms2948 KiB
8Accepted3/33ms3200 KiB
9Wrong answer0/33ms3412 KiB
10Accepted3/33ms3460 KiB
11Wrong answer0/33ms3708 KiB
12Accepted3/33ms3696 KiB