185012025-10-24 20:04:15Teret222Bimmbamm (30)cpp17Wrong answer 15/302ms500 KiB
#include <iostream>
using namespace std;

int main()
{
	int n, i = 1,f = 0;
	string a, b;
	cin >> n;
	
	while (i < n + 1)
	{
		cin >> a;

		if (i % 15 == 0)
			b = "BUMM";
		else if (i % 3 == 0)
			b = "BIMM";
		else if (i % 5 == 0)
			b = "BAMM";
		else
			b = "SZAM";
		if (a != b)
			f = i;
		i++;
	}

	cout << f;
}
SubtaskSumTestVerdictTimeMemory
base15/30
1Accepted0/01ms316 KiB
2Wrong answer0/01ms316 KiB
3Accepted3/31ms500 KiB
4Wrong answer0/31ms500 KiB
5Accepted3/31ms316 KiB
6Accepted3/31ms316 KiB
7Wrong answer0/31ms332 KiB
8Accepted3/31ms316 KiB
9Wrong answer0/31ms356 KiB
10Accepted3/32ms316 KiB
11Wrong answer0/31ms400 KiB
12Wrong answer0/31ms316 KiB