#!/bin/python3
# @EXPECTED_GRADES@ AC WA WA WA
n = int(input())
q = int(input())
laps, t = 0, []
for i in range(q):
t.append(int(input()))
for i in range(q-1):
laps += (t[i]>0 and t[i+1]>0)
print(laps)
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
24 ms |
18164 KB |
Output is correct |
2 |
Correct |
23 ms |
18236 KB |
Output is correct |
3 |
Correct |
23 ms |
18208 KB |
Output is correct |
4 |
Correct |
175 ms |
27880 KB |
Output is correct |
5 |
Correct |
177 ms |
27808 KB |
Output is correct |
6 |
Correct |
174 ms |
27864 KB |
Output is correct |
7 |
Correct |
180 ms |
27876 KB |
Output is correct |
8 |
Correct |
24 ms |
18236 KB |
Output is correct |
9 |
Correct |
23 ms |
18376 KB |
Output is correct |
10 |
Correct |
169 ms |
29388 KB |
Output is correct |
11 |
Correct |
25 ms |
18160 KB |
Output is correct |
12 |
Correct |
184 ms |
27816 KB |
Output is correct |
13 |
Correct |
25 ms |
18228 KB |
Output is correct |
14 |
Correct |
184 ms |
27872 KB |
Output is correct |
15 |
Correct |
25 ms |
18204 KB |
Output is correct |
16 |
Correct |
178 ms |
27880 KB |
Output is correct |
17 |
Correct |
37 ms |
18236 KB |
Output is correct |
18 |
Correct |
171 ms |
29312 KB |
Output is correct |
19 |
Correct |
34 ms |
18236 KB |
Output is correct |
20 |
Correct |
25 ms |
18356 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
25 ms |
18216 KB |
Output is correct |
2 |
Correct |
185 ms |
29348 KB |
Output is correct |
3 |
Correct |
28 ms |
18240 KB |
Output is correct |
4 |
Incorrect |
26 ms |
18192 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
24 ms |
18352 KB |
Output is correct |
2 |
Correct |
23 ms |
18288 KB |
Output is correct |
3 |
Correct |
24 ms |
18252 KB |
Output is correct |
4 |
Correct |
26 ms |
18220 KB |
Output is correct |
5 |
Correct |
25 ms |
18180 KB |
Output is correct |
6 |
Correct |
25 ms |
18176 KB |
Output is correct |
7 |
Correct |
24 ms |
18144 KB |
Output is correct |
8 |
Correct |
26 ms |
18360 KB |
Output is correct |
9 |
Correct |
25 ms |
18380 KB |
Output is correct |
10 |
Incorrect |
29 ms |
18352 KB |
Output isn't correct |
11 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
24 ms |
18164 KB |
Output is correct |
2 |
Correct |
23 ms |
18236 KB |
Output is correct |
3 |
Correct |
23 ms |
18208 KB |
Output is correct |
4 |
Correct |
175 ms |
27880 KB |
Output is correct |
5 |
Correct |
177 ms |
27808 KB |
Output is correct |
6 |
Correct |
174 ms |
27864 KB |
Output is correct |
7 |
Correct |
180 ms |
27876 KB |
Output is correct |
8 |
Correct |
24 ms |
18236 KB |
Output is correct |
9 |
Correct |
23 ms |
18376 KB |
Output is correct |
10 |
Correct |
169 ms |
29388 KB |
Output is correct |
11 |
Correct |
25 ms |
18160 KB |
Output is correct |
12 |
Correct |
184 ms |
27816 KB |
Output is correct |
13 |
Correct |
25 ms |
18228 KB |
Output is correct |
14 |
Correct |
184 ms |
27872 KB |
Output is correct |
15 |
Correct |
25 ms |
18204 KB |
Output is correct |
16 |
Correct |
178 ms |
27880 KB |
Output is correct |
17 |
Correct |
37 ms |
18236 KB |
Output is correct |
18 |
Correct |
171 ms |
29312 KB |
Output is correct |
19 |
Correct |
34 ms |
18236 KB |
Output is correct |
20 |
Correct |
25 ms |
18356 KB |
Output is correct |
21 |
Correct |
25 ms |
18216 KB |
Output is correct |
22 |
Correct |
185 ms |
29348 KB |
Output is correct |
23 |
Correct |
28 ms |
18240 KB |
Output is correct |
24 |
Incorrect |
26 ms |
18192 KB |
Output isn't correct |
25 |
Halted |
0 ms |
0 KB |
- |