139262025-01-09 11:24:48DominikBimmbamm (30)csharpRuntime error 0/3014ms2872 KiB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BIMM
{
    internal class Program
    {
        static void Main(string[] args)
        {
            int N = int.Parse(Console.ReadLine());
            //string[] input = new string[N];
            int counter = 1;
            string expect = "";
            for (int i = 0; i < N; i++)
            {
                if (counter % 3 == 0)
                {
                    if (counter % 5 == 0)
                    {
                        expect = "BUMM";
                    }
                    else
                    {
                        expect = "BIMM";
                    }
                }
                else if (counter % 5 == 0) 
                {
                    expect = "BAMM";
                }
                else
                {
                    expect = "SZAM";
                }
                if (Console.ReadLine()!=expect)
                {
                    break;
                    
                }
                counter++;
            }
            for (int i = 0; i < N-counter; i++)
            {
                Console.ReadLine();
            }
            if (counter-1==N)
            {
                Console.WriteLine("0");
            }
            else
            {
                Console.WriteLine(counter);
            }











            Console.ReadKey();
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base0/30
1Runtime error0/014ms2764 KiB
2Runtime error0/014ms2548 KiB
3Runtime error0/314ms2872 KiB
4Runtime error0/314ms2744 KiB
5Runtime error0/314ms2552 KiB
6Runtime error0/314ms2764 KiB
7Runtime error0/314ms2524 KiB
8Runtime error0/314ms2540 KiB
9Runtime error0/314ms2740 KiB
10Runtime error0/314ms2544 KiB
11Runtime error0/314ms2576 KiB
12Runtime error0/314ms2848 KiB