122272024-12-10 07:44:20AzukitsuBimmbamm (30)python3Accepted 30/3017ms3324 KiB
def main():
    N = int(input())
    answer = 0
    for i in range(1,N+1):
        szo = input()
        if answer == 0:
            helyes = "SZAM"
            h = i % 3 == 0
            o = i % 5 == 0
            if h and o:
                helyes = "BUMM"
            elif h:
                helyes = "BIMM"
            elif o:
                helyes = "BAMM"

            if szo == helyes: continue
            else: answer = i
    print(answer) 
    
main()
SubtaskSumTestVerdictTimeMemory
base30/30
1Accepted0/014ms2872 KiB
2Accepted0/017ms2888 KiB
3Accepted3/316ms3116 KiB
4Accepted3/316ms3120 KiB
5Accepted3/316ms3324 KiB
6Accepted3/316ms2940 KiB
7Accepted3/316ms3124 KiB
8Accepted3/316ms2936 KiB
9Accepted3/316ms3060 KiB
10Accepted3/317ms3124 KiB
11Accepted3/317ms3128 KiB
12Accepted3/317ms3024 KiB