145292025-01-13 21:10:58fonokasszonyBimmbamm (30)python3Runtime error 0/3017ms3320 KiB
n=int(input())
szam=0
szamok=[]
def oszthato3(szam):
    return szam % 3 == 0
def oszthato5(szam):
    return szam % 5 == 0
for i in range(n):
    a=input()
    szamok.append(a)

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

    if oszthato3(szam) and not oszthato5(szam):
    if szamok[i] !=
"bimm":
    s=i+1
    if not oszthato3(szam) and oszthato5(szam):
    if szamok[i] !=
"bamm":
    s=i+1
    if oszthato3(szam) and oszthato5(szam):
    if szamok[i] !=
"bumm":
    s=i+1
    if not oszthato3(szam) and not oszthato5(szam):
    if szamok[i] !=
"szam":
    s=i+1
print(s)
SubtaskSumTestVerdictTimeMemory
base0/30
1Runtime error0/016ms3312 KiB
2Runtime error0/016ms3120 KiB
3Runtime error0/316ms3116 KiB
4Runtime error0/314ms3124 KiB
5Runtime error0/317ms2928 KiB
6Runtime error0/316ms3024 KiB
7Runtime error0/314ms3124 KiB
8Runtime error0/316ms3084 KiB
9Runtime error0/316ms3320 KiB
10Runtime error0/316ms3124 KiB
11Runtime error0/316ms3120 KiB
12Runtime error0/314ms3132 KiB