38212023-03-03 10:03:38PeterBimmbamm (30)csharpWrong answer 3/3026ms21924 KiB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace bimm__bamm__bumm
{
    internal class Program
    {
        static void Main(string[] args)
        {
            int N = int.Parse(Console.ReadLine());


            //Be kell olvasni először mindenképpen egy tömbbe, mivel egyébként azonnal bezárná magát a program
            string[] X = new string[N];

            int i = 0;
            for (i = 0; i < N; i++)
            {
                X[i] = Console.ReadLine();
            }

            string jomond;

            for (i = 1; i <= N; i++)
            {
                if (i % 3 == 0 && i % 5 == 0) //Osztható 3-al és 5-el
                {
                    jomond = "BUMM";
                }
                else if (i % 3 == 0)
                {
                    jomond = "BIMM";
                }
                else if (i % 5 == 0)
                {
                    jomond = "BUMM";
                }
                else
                {
                    jomond = "SZAM";
                }


                if (X[i-1]!=jomond)
                {
                    break;
                }

            }
            
            if(i>N)
            {
                Console.WriteLine(0);
            }
            else
            {
                Console.WriteLine(i);
            }

            //Csak 21/30 pont

            Console.ReadKey();
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base3/30
1Accepted0/026ms20308 KiB
2Wrong answer0/026ms20452 KiB
3Wrong answer0/325ms20564 KiB
4Wrong answer0/325ms21032 KiB
5Accepted3/325ms21492 KiB
6Wrong answer0/325ms21536 KiB
7Wrong answer0/325ms21536 KiB
8Wrong answer0/325ms21744 KiB
9Wrong answer0/325ms21736 KiB
10Wrong answer0/325ms21804 KiB
11Wrong answer0/325ms21880 KiB
12Wrong answer0/325ms21924 KiB