73622024-01-08 11:00:44GhostBimmbamm (30)cpp17Wrong answer 24/303ms3416 KiB
#include <iostream>

using namespace std;

int main()
{
    int length;
    cin >> length;
    length++;

    string current;
    for (int i = 1; i < length; i++) {
        cin >> current;
        if (i % 3 == 0) {
            if (i % 5 == 0 && current == "BUMM") {
                continue;
            }
            else if (current == "BIMM") {
                continue;
            }
            cout << i;
            return 0;
        }
        else if (i % 5 == 0 && current == "BAMM") {
            continue;
        }
        else if (current == "SZAM") {
            continue;
        }
        cout << i;
        return 0;
    }
}
SubtaskSumTestVerdictTimeMemory
base24/30
1Accepted0/03ms1680 KiB
2Accepted0/03ms1848 KiB
3Accepted3/33ms2060 KiB
4Accepted3/33ms2304 KiB
5Accepted3/33ms2484 KiB
6Wrong answer0/33ms2564 KiB
7Accepted3/33ms2820 KiB
8Accepted3/33ms2784 KiB
9Accepted3/33ms3028 KiB
10Accepted3/33ms3148 KiB
11Accepted3/33ms3332 KiB
12Wrong answer0/33ms3416 KiB