63362023-11-20 10:59:44GervidBimmbamm (30)cpp17Wrong answer 3/303ms3280 KiB
#include <iostream>

using namespace std;

int main()
{
	int n, i;
	cin >> n;

	string in;

	for (i = 1; i <= n; i++)
	{
		cin >> in;

		if (i % 3 == 0)
		{
			if (i % 5 == 0 && in != "BUMM")
			{
				cout << i;
				return 0;
			}
			else
			{
				if (in != "BIMM")
				{
					cout << i;
					return 0;
				}
			}
		}
		else
		{
			if (i % 5 == 0 && in != "BAMM")
			{
				cout << i;
				return 0;
			}
			else
			{
				if (in != "SZAM")
				{
					cout << i;
					return 0;
				}
			}
		}
	}
}
SubtaskSumTestVerdictTimeMemory
base3/30
1Accepted0/03ms1812 KiB
2Wrong answer0/03ms2000 KiB
3Wrong answer0/33ms2216 KiB
4Wrong answer0/32ms2328 KiB
5Accepted3/33ms2528 KiB
6Wrong answer0/32ms2608 KiB
7Wrong answer0/32ms2608 KiB
8Wrong answer0/32ms2732 KiB
9Wrong answer0/33ms2744 KiB
10Wrong answer0/33ms2948 KiB
11Wrong answer0/32ms3032 KiB
12Wrong answer0/33ms3280 KiB