6328 | 2023. 11. 20 08:04:36 | Csongi | Bimmbamm (30) | csharp | Elfogadva 30/30 | 28ms | 22172 KiB |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace bimmbamm
{
class Program
{
static void Main(string[] args)
{
int n = Convert.ToInt32(Console.ReadLine());
string[] tomb = new string[n+1];
bool[] ter = new bool[tomb.Length];
for (int i = 1; i <= n; i++)
{
tomb[i] = Console.ReadLine();
if (tomb[i] == "SZAM" && i % 3 != 0 && i % 5 != 0)
ter[i] = true;
else if (tomb[i] == "BIMM" && i % 3 == 0 && i % 5 != 0)
ter[i] = true;
else if (tomb[i] == "BAMM" && i % 3 != 0 && i % 5 == 0)
ter[i] = true;
else if (tomb[i] == "BUMM" && i % 3 == 0 && i % 5 == 0)
ter[i] = true;
else
ter[i] = false;
}
for (int i = 1; i <= ter.Length; i++)
{
if (ter[i] == false)
{
Console.WriteLine(i);
break;
}
}
Console.ReadKey();
}
}
}
Részfeladat | Összpont | Teszt | Verdikt | Idő | Memória | ||
---|---|---|---|---|---|---|---|
base | 30/30 | ||||||
1 | Elfogadva | 0/0 | 27ms | 20172 KiB | |||
2 | Elfogadva | 0/0 | 26ms | 20424 KiB | |||
3 | Elfogadva | 3/3 | 26ms | 21068 KiB | |||
4 | Elfogadva | 3/3 | 28ms | 21368 KiB | |||
5 | Elfogadva | 3/3 | 27ms | 21712 KiB | |||
6 | Elfogadva | 3/3 | 26ms | 21932 KiB | |||
7 | Elfogadva | 3/3 | 26ms | 21900 KiB | |||
8 | Elfogadva | 3/3 | 26ms | 21948 KiB | |||
9 | Elfogadva | 3/3 | 26ms | 21992 KiB | |||
10 | Elfogadva | 3/3 | 26ms | 22124 KiB | |||
11 | Elfogadva | 3/3 | 26ms | 21880 KiB | |||
12 | Elfogadva | 3/3 | 26ms | 22172 KiB |