120532024-11-26 13:34:03TortelliniJrHét krajcárcpp17Accepted 100/1003ms436 KiB
// NOTE: it is recommended to use this even if you don't understand the following code.

#include <fstream>
#include <iostream>
#include <vector>

using namespace std;

int main() {
    // uncomment the following lines if you want to read/write from files
    // ifstream cin("input.txt");
    // ofstream cout("output.txt");
    int N;
    int t[10000];
    cin >> N;
    for (int i = 0; i < N; i++)
    {
        cin >> t[i];
        if (t[i] == 7)
        {
            cout << i + 1;
            return 0;
        }
    }
    cout << "-1";
    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted1ms320 KiB
2Accepted1ms320 KiB
subtask2100/100
3Accepted1ms320 KiB
4Accepted1ms320 KiB
5Accepted3ms320 KiB
6Accepted3ms320 KiB
7Accepted1ms320 KiB
8Accepted1ms320 KiB
9Accepted1ms320 KiB
10Accepted1ms320 KiB
11Accepted1ms320 KiB
12Accepted1ms320 KiB
13Accepted1ms320 KiB
14Accepted3ms320 KiB
15Accepted3ms320 KiB
16Accepted2ms320 KiB
17Accepted2ms436 KiB