[백준] 2839번 : 설탕 배달 - Python(파이썬)

강재원·2022년 10월 17일
0

[코딩테스트] Python

목록 보기
119/200



https://www.acmicpc.net/problem/2839

n=int(input())
t=0
while not n%5==0:
    n-=3
    if n<0:
        t=-1
        break
    else:
        t+=1
if n>0:
    t+=int(n/5)
print(t)
profile
개념정리 & 문법 정리 & 알고리즘 공부

0개의 댓글