197002025-12-19 10:19:44szjBimmbamm (30)cpp17Wrong answer 3/301ms508 KiB
#include <iostream>
using namespace std;
int main()
{
    int n;
    string a;
    cin >> n;
    for(int i=1; i<=n; i++)
    {
      cin >> a;
      if(i%5==0 && i%3==0 && a!="BUMM")
      {
          cout << i;
          return 0;
      }
      if(i%3==0 && a!="BIMM")
      {
          cout << i;
          return 0;
      }
      if(i%5==0 && a!="BAMM")
      {
          cout << i;
          return 0;
      }
      if(i%5 && i%3 && a!="SZAM")
      {
          cout << i;
          return 0;
      }
    }
    cout << 0;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base3/30
1Accepted0/01ms508 KiB
2Wrong answer0/01ms316 KiB
3Wrong answer0/31ms508 KiB
4Wrong answer0/31ms316 KiB
5Accepted3/31ms316 KiB
6Wrong answer0/31ms316 KiB
7Wrong answer0/31ms316 KiB
8Wrong answer0/31ms316 KiB
9Wrong answer0/31ms316 KiB
10Wrong answer0/31ms316 KiB
11Wrong answer0/31ms316 KiB
12Wrong answer0/31ms316 KiB