97282024-03-04 15:01:56MarkNesovanovicBimmbamm (30)cpp17Accepted 30/303ms3304 KiB
#include <iostream>
#include <vector>

using namespace std;

int main() {
    int n;
    cin >> n;
    vector<string> v;
    for (int i = 1; i <= n; i++) {
        string str;
        cin >> str;
        v.push_back(str);
    }

    for (int i = 1; i <= n; i++) {
        string str1;
        if (i % 3 == 0 && i % 5 == 0)
            str1 = "BUMM";
        else if (i % 3 == 0)
            str1 = "BIMM";
        else if (i % 5 == 0)
            str1 = "BAMM";
        else
            str1 = "SZAM";

        if (str1 != v[i-1]) {
            cout << i;
            break;
        }
    }


    return 0;
}
SubtaskSumTestVerdictTimeMemory
base30/30
1Accepted0/03ms1812 KiB
2Accepted0/03ms2240 KiB
3Accepted3/33ms2216 KiB
4Accepted3/33ms2432 KiB
5Accepted3/33ms2520 KiB
6Accepted3/33ms2800 KiB
7Accepted3/33ms2788 KiB
8Accepted3/33ms3004 KiB
9Accepted3/33ms3004 KiB
10Accepted3/33ms3032 KiB
11Accepted3/33ms3028 KiB
12Accepted3/33ms3304 KiB