121782024-12-06 15:34:43kbarnabasBimmbamm (30)python3Wrong answer 0/3019ms3160 KiB
n = int(input())
szam = 0
szamok = []


def oszthato(szam):
    return szam % 3 == 0, szam % 5 == 0

for i in range(n):
    a = input()
    szamok.append(a)

print(szamok)

for i in range(n):
    szam += 1

    if oszthato(3) and not oszthato(5):
        if szamok[i] != "BIMM":
            s = i+1
    if not oszthato(3) and oszthato(5):
        if szamok[i] != "BAMM":
            s = i+1
    if oszthato(3) and oszthato(5):
        if szamok[i] != "BUMM":
            s = i+1
    if not oszthato(3) and not oszthato(5):
        if szamok[i] != "SZAM":
            s = i+1

print(s)
    




    



SubtaskSumTestVerdictTimeMemory
base0/30
1Wrong answer0/016ms3128 KiB
2Wrong answer0/018ms3128 KiB
3Wrong answer0/316ms3136 KiB
4Wrong answer0/316ms3132 KiB
5Wrong answer0/317ms3136 KiB
6Wrong answer0/316ms3132 KiB
7Wrong answer0/316ms3160 KiB
8Wrong answer0/317ms2984 KiB
9Wrong answer0/317ms3128 KiB
10Wrong answer0/319ms3128 KiB
11Wrong answer0/318ms3124 KiB
12Wrong answer0/319ms3084 KiB