Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
8
maximum = int(input()) length = int(input()) a = [] r = 1 result = 0 for i in range(length): b=int(input()) a.append(b) while r != 0: r = 0 for i in range(len(a)): if r == 0: if a[i] == 1: result += 1 if length - i > maximum: a = a[:i] + a[i + maximum] else: a = a[:i] r += 1 print(result)
run
|
edit
|
history
|
help
0
Keygen for 010 Editor
5
Fu 1
My webapp demo
Which Premier League match should I watch?
три шарика в матрице
Faiha - Lesson 8
fb_series
Два шарика в квадрате
shuru4