121772024-12-06 15:34:07kbarnabasBimmbamm (30)python3Wrong answer 0/3019ms3320 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/016ms3132 KiB
2Wrong answer0/018ms3320 KiB
3Wrong answer0/316ms3128 KiB
4Wrong answer0/316ms3124 KiB
5Wrong answer0/317ms3168 KiB
6Wrong answer0/316ms3056 KiB
7Wrong answer0/316ms3160 KiB
8Wrong answer0/317ms3128 KiB
9Wrong answer0/317ms3132 KiB
10Wrong answer0/319ms3128 KiB
11Wrong answer0/318ms3228 KiB
12Wrong answer0/318ms3128 KiB