답안 #167191

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
167191 2019-12-06T10:01:59 Z boolodifjenula Telefoni (COCI17_telefoni) Python 3
80 / 80
211 ms 8912 KB
N,D=map(int,input().split())
T=list(map(int,input().split()))
b=0
n=0
for i in range(1,N):
    if T[i]==0:
        n+=1
    else: n=0
    if n==D:
        T[i]==1
        n=0
        b+=1
print(b)
# 결과 실행 시간 메모리 Grader output
1 Correct 25 ms 3300 KB Output is correct
2 Correct 25 ms 3300 KB Output is correct
3 Correct 26 ms 3324 KB Output is correct
4 Correct 25 ms 3300 KB Output is correct
5 Correct 26 ms 3300 KB Output is correct
6 Correct 25 ms 3292 KB Output is correct
7 Correct 26 ms 3300 KB Output is correct
8 Correct 211 ms 8912 KB Output is correct
9 Correct 207 ms 8912 KB Output is correct
10 Correct 194 ms 8792 KB Output is correct