50172023-04-09 17:54:51Laci3000Bimmbamm (30)cpp17Wrong answer 18/303ms3532 KiB
#include <vector>
#include <iostream>

using namespace std;

int megoldo() {
    int bemenet;
    cin >> bemenet;
    int a = 0;
    vector<string>lista(bemenet);
    for (size_t i = 0; i < bemenet; i++)
    {
        cin >> lista[i];
    }for (size_t i = 0; i < bemenet; i++)
    {
       if(((i + 1) % 3 == 0 && (i + 1) % 5 == 0 && lista[i] == "BUMM") || ((i + 1) % 3 == 0 && lista[i] == "BIMM") || ((i + 1) % 5 == 0 && lista[i] == "BAMM") || ((i + 1) % 3 == 1 || (i + 1) % 3 == 2 && lista[i] == "SZAM")) {
       
       }
       else {
           a = i + 1;
           break;
       }
    }
    return a;
}

int main()
{
 cout << megoldo();
}

SubtaskSumTestVerdictTimeMemory
base18/30
1Wrong answer0/03ms1812 KiB
2Accepted0/03ms2084 KiB
3Wrong answer0/33ms2272 KiB
4Accepted3/33ms2436 KiB
5Wrong answer0/33ms2508 KiB
6Wrong answer0/33ms2640 KiB
7Accepted3/33ms2856 KiB
8Accepted3/33ms3072 KiB
9Accepted3/33ms3160 KiB
10Accepted3/33ms3172 KiB
11Accepted3/33ms3316 KiB
12Wrong answer0/33ms3532 KiB