113852024-08-30 16:19:1242Bimmbamm (30)python3Accepted 30/3017ms3280 KiB
N=int(input())
r=0
for i in range(1,N+1):
 c=input()
 if i%15==0:
  if c[1]!='U':
   r=i
   break
 elif i%3==0:
  if c[1]!='I':
   r=i
   break
 elif i%5==0:
  if c[1]!='A':
   r=i
   break
 else:
  if c[1]!='Z':
   r=i
   break
print(r)
SubtaskSumTestVerdictTimeMemory
base30/30
1Accepted0/016ms3048 KiB
2Accepted0/017ms3088 KiB
3Accepted3/316ms3048 KiB
4Accepted3/316ms3092 KiB
5Accepted3/316ms3048 KiB
6Accepted3/317ms3064 KiB
7Accepted3/317ms2920 KiB
8Accepted3/316ms3228 KiB
9Accepted3/317ms3280 KiB
10Accepted3/317ms3048 KiB
11Accepted3/316ms3048 KiB
12Accepted3/317ms3192 KiB