honey_pot
[python] 백준 7567번 본문
res = 10
a = input()
for i in range(1, len(a)):
res +=10 if a[i-1] != a[i] else 5
print(res)
그릇의 모양이 같으면 5, 다르면 10을 더해주는 문제이다.
'문제 풀이' 카테고리의 다른 글
[python] 백준 10102번 (0) | 2021.06.08 |
---|---|
[python] 백준 5063번 (0) | 2021.06.08 |
[python] 백준 10988번 (0) | 2021.06.08 |
[python] 백준 5086번 (0) | 2021.06.08 |
[python] 백준 10214번 (0) | 2021.06.08 |
Comments