728x90
def solution(hp):
return hp // 5 + (hp % 5 // 3) + ((hp % 5) % 3)
def solution(hp):
answer = hp // 5
hp = hp % 5
answer += hp // 3
hp = hp % 3
answer += hp
return answer
728x90
'CodingTest > [프로그래머스 LV.0]' 카테고리의 다른 글
프로그래머스 LV.0 - n의 배수 고르기[Python] (0) | 2023.01.22 |
---|---|
프로그래머스 LV.0 - 세균 증식[Python] (0) | 2023.01.22 |
프로그래머스 LV.0 - 모음 제거[Python] (0) | 2023.01.22 |
프로그래머스 LV.0 - 숨어있는 숫자의 덧셈 (1)[Python] (0) | 2023.01.22 |
프로그래머스 LV.0 - 제곱수 판별하기[Python] (0) | 2023.01.22 |