add: swea/1289.py

This commit is contained in:
Gyubin Han
2024-05-08 17:17:13 +09:00
parent 75a3454c78
commit b13d2171c8

16
swea/1289.py Normal file
View File

@@ -0,0 +1,16 @@
t=int(input())
for tc in range(1,t+1):
s=input()
isZero=True
count=0
for i in s:
if i=='0' and not(isZero):
isZero=True
count+=1
elif i=='1' and isZero:
isZero=False
count+=1
print("#"+str(tc),count)