153522025-02-19 08:46:32TortelliniJrBimmbamm (30)csharpRuntime error 0/3014ms2876 KiB
using System;
namespace bimmbamm
{
    class Program
    {
        static void Main(string[] args)
        { 
            int len = int.Parse(Console.ReadLine());
            string be;
            int breaks = 0;

            for (int i = 1; i < len + 1; i++)
            {

                be = Console.ReadLine();


                if (be != "BUMM" && i % 15 == 0)
                {
                    breaks = i;
                }
                else if (be != "BIMM" && i % 3 == 0 && i % 5 != 0)
                {
                    breaks = i;
                }
                else if (be != "BAMM" && i % 5 == 0 && i % 3 != 0)
                {
                    breaks = i;
                }
                else if (be != "SZAM" && i % 5 != 0 && i % 3 != 0)
                {
                    breaks = i;
                }
            }
            /*for (int i = breaks; i < len; i++)
            {
                Console.ReadLine();
            }*/

            Console.WriteLine(breaks);
            Console.ReadKey();
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base0/30
1Runtime error0/014ms2616 KiB
2Runtime error0/014ms2780 KiB
3Runtime error0/314ms2828 KiB
4Runtime error0/314ms2836 KiB
5Runtime error0/314ms2556 KiB
6Runtime error0/314ms2832 KiB
7Runtime error0/314ms2612 KiB
8Runtime error0/314ms2808 KiB
9Runtime error0/314ms2816 KiB
10Runtime error0/314ms2876 KiB
11Runtime error0/314ms2772 KiB
12Runtime error0/314ms2864 KiB