Commit 864c5c10 by BellCodeEditor

save project

parent 7bb06e0e
Showing with 10 additions and 3 deletions
x = input() x = input()
xx = list(x) xx = x.split(',')
a = xx.count('1') xx.append('0')
xx.insert(0,'0')
a = 0
for i in range(0,len(xx)-2):
if xx[i] == '0' and xx[i+1] == '0' and xx[i+2] == '0':
a += 1
xx[i+1] = '1'
print(a) print(a)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment