Baekjoon Case

[파이썬 / 백준 2839번] 설탕 배달

Scarlett_C 2021. 11. 12. 14:02
728x90

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

N=int(input())    

bag=0
while N>=0:
    if N%5==0:
        bag+=(N//5)
        print(bag)
        break
    N-=3
    bag+=1
else: print(-1)

 

728x90