728x90
풀이
걷기만 하면 주어지는 '이상한 사탕'으로 포켓몬을 렙업하기 위해 필요한 개수를 구하면 된다.
단, 그룹별로 '이상한 사탕'을 얻기위해 걸어야 하는 거리가 다르다.
E - C가 항상 양수라는 규칙은 없으니 0보다 작아지는 예외를 생각해 문제를 풀이하자
소스코드
출처
18691번: Pokemon Buddy
Pokemon Go just released the Buddy update. It lets you select a Pokemon to appear alongside your trainer’s avatar on your profile screen. As you walk with your buddy, it will find candy that can be used to evolve the Pokemon. The Buddy system divides the
www.acmicpc.net
728x90
'PS > Baekjoon Online Judge' 카테고리의 다른 글
[백준 19602] Dog Treats [Python] (0) | 2023.05.10 |
---|---|
[백준 18698] The Walking Adam [Python] (0) | 2023.05.10 |
[백준 18414] X に最も近い値 (The Nearest Value) [Python] (0) | 2023.05.07 |
[백준 18408] 3 つの整数 (Three Integers) [Python] (0) | 2023.05.06 |
[백준 18398] HOMWRK [Python] (0) | 2023.05.06 |