139632025-01-09 12:59:44BalintbuziBimmbamm (30)csharpRuntime error 0/3014ms2788 KiB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace bimmbamm
{
    internal class Program
    {
        static void Main(string[] args)
        {
            
            int a = int.Parse(Console.ReadLine());
            string[]b =new string[a];
            int hiba = 0;
            for (int i = 0; i < a; i++)
            {
                
                b[i] = Console.ReadLine();
                if ((i + 1) % 3 == 0 && (b[i] == "SZAM" || b[i]=="BAMM"))
                {
                    hiba = (i + 1);
                }
                if ((i + 1) % 5 == 0 && (b[i] == "SZAM" || b[i] == "BIMM"))
                {
                    hiba = (i + 1);
                }
                if ((i + 1) % 5 == 0 && (i+1)%3==0 && (b[i] == "SZAM" || b[i] == "BIMM" || b[i]=="BAMM"))
                {
                    hiba = (i + 1);
                }
                if ((i+1)%5!=0&& (i + 1) % 3 != 0 && b[i]!="SZAM")
                {
                    hiba = (i + 1);
                }
            }
            








            
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base0/30
1Runtime error0/014ms2788 KiB
2Runtime error0/014ms2748 KiB
3Runtime error0/314ms2520 KiB
4Runtime error0/314ms2776 KiB
5Runtime error0/314ms2756 KiB
6Runtime error0/314ms2756 KiB
7Runtime error0/314ms2532 KiB
8Runtime error0/314ms2628 KiB
9Runtime error0/314ms2604 KiB
10Runtime error0/314ms2680 KiB
11Runtime error0/314ms2496 KiB
12Runtime error0/314ms2636 KiB