112602024-08-02 08:51:09probaBimmbamm (30)python3Accepted 30/3019ms3192 KiB
#bimm
N = int(input())
adatok = [input().strip() for i in range(1, N+1)]
#print(adatok)
i, gen = 1, 'SZAM'

while i < len(adatok) and gen == adatok[i-1]:
    i += 1
    gen = 'BUMM' if (i % 3 == 0) and (i % 5 == 0) else 'BAMM' if i % 5 == 0 else 'BIMM' if i % 3 == 0 else 'SZAM'

print(i)
        
SubtaskSumTestVerdictTimeMemory
base30/30
1Accepted0/018ms2964 KiB
2Accepted0/019ms3084 KiB
3Accepted3/317ms2916 KiB
4Accepted3/317ms3072 KiB
5Accepted3/317ms2960 KiB
6Accepted3/317ms2916 KiB
7Accepted3/318ms3044 KiB
8Accepted3/318ms3064 KiB
9Accepted3/318ms2892 KiB
10Accepted3/318ms3044 KiB
11Accepted3/318ms3192 KiB
12Accepted3/318ms3044 KiB