add: boj/1439.py
This commit is contained in:
12
boj/1439.py
Normal file
12
boj/1439.py
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
s=input()
|
||||||
|
|
||||||
|
count=0
|
||||||
|
last=s[0]
|
||||||
|
for i in range(1,len(s)):
|
||||||
|
if not s[i]==last:
|
||||||
|
count+=1
|
||||||
|
last=s[i]
|
||||||
|
if count%2==1:
|
||||||
|
print(count//2+1)
|
||||||
|
else:
|
||||||
|
print(count//2)
|
||||||
Reference in New Issue
Block a user