90912024-02-13 20:12:59RRoliBimmbamm (30)cpp17Accepted 30/303ms3420 KiB
#include <iostream>
using namespace std;

int n, hiba;
int main()
{
    cin >> n;
	for(int i = 1; i <= n; i++) {
		string s, kell;
		cin >> s;
		if(i % 15 == 0) kell = "BUMM";
		else if(i % 3 == 0) kell = "BIMM";
		else if(i % 5 == 0) kell = "BAMM";
		else kell = "SZAM";
		if(s != kell) {
			hiba = i;
			break;
		}
	}
	cout << hiba;

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base30/30
1Accepted0/03ms1816 KiB
2Accepted0/03ms2060 KiB
3Accepted3/33ms2140 KiB
4Accepted3/33ms2132 KiB
5Accepted3/33ms2208 KiB
6Accepted3/33ms2340 KiB
7Accepted3/33ms2556 KiB
8Accepted3/33ms3048 KiB
9Accepted3/33ms2948 KiB
10Accepted3/33ms3124 KiB
11Accepted3/33ms3328 KiB
12Accepted3/33ms3420 KiB