cool hamsters never sleep

백준 7567. 그릇 본문

Python Algorithm

백준 7567. 그릇

슈슈 susu 2022. 9. 25. 16:28
dish = list(input())
h = 10

for i in range (len(dish)-1) :
  if dish[i] == dish[i+1] :
    h = h + 5
  else :
    h = h + 10

print(h)

'Python Algorithm' 카테고리의 다른 글

백준 2902. KMP는 왜 KMP일까?  (0) 2022.09.27
백준 5063. TGN  (0) 2022.09.26
백준 2506. 점수계산  (0) 2022.09.25
백준 10162. 전자레인지  (0) 2022.09.23
백준 4447. 좋은놈 나쁜놈  (0) 2022.09.22
Comments