Created
October 25, 2015 21:56
-
-
Save popey456963/28498c3618ea1ead8759 to your computer and use it in GitHub Desktop.
Counting Zeroes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
t,c=0,0 | |
for i in input(): | |
if i=="0":c+=1 | |
else:c=0 | |
t=(c,t)[c<t] | |
print(t) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment