123682024-12-13 11:27:19birozsBimmbamm (30)python3Accepted 30/3017ms3380 KiB
N = int(input())
lista = []
for i in range(N):
    lista.append(input())
hiba = False
for i in range(1,N+1):
    szo = "SZAM"
    if i % 3 == 0 and i % 5 != 0:
        szo = "BIMM"
    if i % 3 != 0 and i % 5 == 0:
        szo = "BAMM"
    if i % 3 == 0 and i % 5 == 0:
        szo = "BUMM"
    if szo != lista[i-1]:
        print(i)
        hiba = True
        break
if not hiba:
    print(0)
SubtaskSumTestVerdictTimeMemory
base30/30
1Accepted0/016ms3120 KiB
2Accepted0/017ms3048 KiB
3Accepted3/316ms3124 KiB
4Accepted3/316ms3320 KiB
5Accepted3/317ms3312 KiB
6Accepted3/316ms2928 KiB
7Accepted3/317ms3296 KiB
8Accepted3/317ms3128 KiB
9Accepted3/316ms3128 KiB
10Accepted3/317ms3136 KiB
11Accepted3/317ms3380 KiB
12Accepted3/317ms3024 KiB