7412022-01-03 17:02:40kismartongBimmbamm (30)python3Wrong answer 27/3057ms19612 KiB
from sys import stdin, stdout

def main():
	n = int(stdin.readline())
	e = ["SZAM", "BIMM", "BAMM", "BUMM"]
	meg = 0
	ind = 0
	sek = []
	for i in range(n):
		be = stdin.readline().replace("\n", "")
		sek.append(be)
	for i in range(1, n):
		if i % 3 == 0:
			ind = 1
		else:
			ind = 0
		if i % 5 == 0:
			ind += 2
		if sek[i-1] != e[ind]:
			meg = i
			break
	stdout.writelines(str(meg)+"\n")	
	
main()
SubtaskSumTestVerdictTimeMemory
base27/30
1Wrong answer0/057ms19556 KiB
2Accepted0/039ms19560 KiB
3Accepted3/341ms19444 KiB
4Accepted3/329ms19612 KiB
5Accepted3/329ms19592 KiB
6Wrong answer0/332ms19476 KiB
7Accepted3/332ms19500 KiB
8Accepted3/330ms19608 KiB
9Accepted3/330ms19528 KiB
10Accepted3/329ms19544 KiB
11Accepted3/330ms19612 KiB
12Accepted3/330ms19484 KiB