115342024-10-21 18:07:07SzmolikGusztavBimmbamm (30)csharpRuntime error 0/3016ms2968 KiB
using System;

namespace BimmBammBumm {
    
    public class Program {
        
        public static void Main () {
            short n = short.Parse (Console.ReadLine ());
            short ans = 0;
            
            for (short 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/014ms2552 KiB
2Runtime error0/014ms2888 KiB
3Runtime error0/314ms2772 KiB
4Runtime error0/316ms2916 KiB
5Runtime error0/314ms2752 KiB
6Runtime error0/314ms2844 KiB
7Runtime error0/314ms2748 KiB
8Runtime error0/314ms2860 KiB
9Runtime error0/314ms2728 KiB
10Runtime error0/314ms2852 KiB
11Runtime error0/314ms2872 KiB
12Runtime error0/314ms2968 KiB