36252023-03-01 12:08:00AndrásBimmbamm (30)python3Runtime error 27/3018ms13340 KiB
m = 0
Rounds = []
num  = int(input())
for i in range(num):
    char = input()
    Rounds.append(char)
Sum1 = 0
for i in Rounds:
    Sum1 = Sum1 + 1
    if (Sum1+1) % 3 == 0:
        if (Sum1+1) % 5 == 0:
            if Rounds[Sum1] != "BUMM":
                m = Sum1 + 1
                break
        else:
            if Rounds[Sum1] != "BIMM":
                m = Sum1 + 1
                break
    elif (Sum1+1) % 5 == 0:
        if Rounds[Sum1] != "BAMM":
                m = Sum1 + 1
                break
    else:
        if Rounds[Sum1] != "SZAM":
            m = Sum1 + 1
            break
print(m)
SubtaskSumTestVerdictTimeMemory
base27/30
1Accepted0/018ms11268 KiB
2Accepted0/018ms11568 KiB
3Accepted3/317ms11356 KiB
4Accepted3/317ms11632 KiB
5Runtime error0/317ms11768 KiB
6Accepted3/317ms12136 KiB
7Accepted3/317ms12400 KiB
8Accepted3/317ms12712 KiB
9Accepted3/317ms12676 KiB
10Accepted3/318ms12968 KiB
11Accepted3/317ms13132 KiB
12Accepted3/318ms13340 KiB