add: boj/1439.py

This commit is contained in:
Gyubin Han
2024-05-10 03:39:18 +09:00
parent 535574a65a
commit 8535ed7002

12
boj/1439.py Normal file
View 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)