37402023-03-02 17:14:21grengBimmbamm (30)cpp11Runtime error 0/303ms3644 KiB
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>

using namespace std;


int main() {
	int N;
	cin >> N;
	for (int i = 1; i < N; i++) {
		string a;
		getline(cin, a);
		string kell;
		if (i % 5 == 0 && i % 3 == 0) {
			kell = "BUMM";
		}
		else if (i % 3 == 0) {
			kell = "BIMM";
		}
		else if (i % 5 == 0) {
			kell = "BAMM";
		}
		else {
			kell = "SZAM";
		}
		if (a != kell)
			return i;
	}
}
SubtaskSumTestVerdictTimeMemory
base0/30
1Runtime error0/03ms1684 KiB
2Runtime error0/03ms1844 KiB
3Runtime error0/32ms2060 KiB
4Runtime error0/32ms2300 KiB
5Runtime error0/32ms2480 KiB
6Runtime error0/33ms2732 KiB
7Runtime error0/33ms2940 KiB
8Runtime error0/32ms3200 KiB
9Runtime error0/32ms3396 KiB
10Runtime error0/32ms3604 KiB
11Runtime error0/32ms3644 KiB
12Runtime error0/32ms3644 KiB