115332024-10-21 17:55:22SzmolikGusztavBimmbamm (30)csharpRuntime error 0/3014ms2944 KiB
using System;

public class Program {
    
    public static void Main () {
        int n = int.Parse (Console.ReadLine ());
        int ans = 0;
        
        for (int i = 1; i <= n && ans == 0; i++) {
            string s = Console.ReadLine ();
            string sExpect = (i%15 == 0 ? "BUMM" : (i%5 == 0 ? "BAMM" : (i%3 == 0 ? "BIMM" : "SZAM")));
            
            if (sExpect != s)
                ans = i;
        }
        
        Console.WriteLine (ans);
    }
}
SubtaskSumTestVerdictTimeMemory
base0/30
1Runtime error0/014ms2808 KiB
2Runtime error0/014ms2780 KiB
3Runtime error0/314ms2780 KiB
4Runtime error0/314ms2768 KiB
5Runtime error0/314ms2580 KiB
6Runtime error0/314ms2756 KiB
7Runtime error0/314ms2944 KiB
8Runtime error0/314ms2756 KiB
9Runtime error0/314ms2772 KiB
10Runtime error0/314ms2688 KiB
11Runtime error0/314ms2648 KiB
12Runtime error0/314ms2508 KiB