12053 | 2024-11-26 13:34:03 | TortelliniJr | Hét krajcár | cpp17 | Accepted 100/100 | 3ms | 436 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;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 1ms | 320 KiB | ||||
2 | Accepted | 1ms | 320 KiB | ||||
subtask2 | 100/100 | ||||||
3 | Accepted | 1ms | 320 KiB | ||||
4 | Accepted | 1ms | 320 KiB | ||||
5 | Accepted | 3ms | 320 KiB | ||||
6 | Accepted | 3ms | 320 KiB | ||||
7 | Accepted | 1ms | 320 KiB | ||||
8 | Accepted | 1ms | 320 KiB | ||||
9 | Accepted | 1ms | 320 KiB | ||||
10 | Accepted | 1ms | 320 KiB | ||||
11 | Accepted | 1ms | 320 KiB | ||||
12 | Accepted | 1ms | 320 KiB | ||||
13 | Accepted | 1ms | 320 KiB | ||||
14 | Accepted | 3ms | 320 KiB | ||||
15 | Accepted | 3ms | 320 KiB | ||||
16 | Accepted | 2ms | 320 KiB | ||||
17 | Accepted | 2ms | 436 KiB |