115452024-10-22 23:48:49SzmolikGusztavBimmbamm (30)csharpRuntime error 0/3014ms3020 KiB
using System;

public class Program {
    
    public static void Main () {
        short n;
        short.TryParse (Console.ReadLine (), out n);
        short ans = 0;
        
        for (short i = 1; i <= n && ans == 0; i++) {
            string s = Console.ReadLine ();
            string sExpect = string.Empty;
            
            if (i%15 == 0)
                sExpect = "BUMM";
            
            else if (i%5 == 0)
                sExpect = "BAMM";
            
            else if (i%3 == 0)
                sExpect = "BIMM";
            
            else
                sExpect = "SZAM";
            
            if (sExpect != s)
                ans = i;
        }
        
        Console.WriteLine (ans.ToString ());
    }
}
SubtaskSumTestVerdictTimeMemory
base0/30
1Runtime error0/014ms2804 KiB
2Runtime error0/014ms2772 KiB
3Runtime error0/314ms2852 KiB
4Runtime error0/314ms2772 KiB
5Runtime error0/314ms2860 KiB
6Runtime error0/314ms2832 KiB
7Runtime error0/314ms3020 KiB
8Runtime error0/314ms2788 KiB
9Runtime error0/314ms2752 KiB
10Runtime error0/314ms2932 KiB
11Runtime error0/314ms2744 KiB
12Runtime error0/314ms2716 KiB