145272025-01-13 21:02:36fonokasszonyBimmbamm (30)python3Runtime error 0/3017ms3160 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/014ms3132 KiB
2Runtime error0/014ms3128 KiB
3Runtime error0/316ms3108 KiB
4Runtime error0/316ms3124 KiB
5Runtime error0/317ms3124 KiB
6Runtime error0/316ms3116 KiB
7Runtime error0/316ms3112 KiB
8Runtime error0/316ms3160 KiB
9Runtime error0/317ms3060 KiB
10Runtime error0/316ms3056 KiB
11Runtime error0/316ms3124 KiB
12Runtime error0/314ms3072 KiB