123742024-12-13 21:40:30helloworldBimmbamm (30)cpp17Wrong answer 0/301ms320 KiB
#include <iostream>
#include <fstream>
#include <string>
using namespace std;

int main() {
    ifstream input("input.txt");
    ofstream output("output.txt");

    int N;
    input >> N;

    for (int i = 1; i <= N; ++i) {
        string word;
        input >> word;

        string expected = "";

        if (i % 3 == 0 && i % 5 == 0) {
            expected = "BUMM";
        } else if (i % 3 == 0) {
            expected = "BIMM";
        } else if (i % 5 == 0) {
            expected = "BAMM";
        } else {
            expected = "SZAM";
        }

        if (word != expected) {
            output << i << endl;
            return 0;
        }
    }

    output << 0 << endl;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base0/30
1Wrong answer0/01ms320 KiB
2Wrong answer0/01ms320 KiB
3Wrong answer0/31ms320 KiB
4Wrong answer0/31ms320 KiB
5Wrong answer0/31ms320 KiB
6Wrong answer0/31ms320 KiB
7Wrong answer0/31ms320 KiB
8Wrong answer0/31ms320 KiB
9Wrong answer0/31ms320 KiB
10Wrong answer0/31ms320 KiB
11Wrong answer0/31ms320 KiB
12Wrong answer0/31ms320 KiB