본문 바로가기
python-algorithm

[백준] 2839

by 무적김두칠 2021. 1. 21.

1
2
3
4
5
6
7
8
9
10
11
n=int (input())
ans=0
while n>=0:
    if n%5 == 0 :
        ans+=(n//5)
        print(ans)
        break
    n-=3
    ans+=1
else:
    print(-1)
cs
반응형

'python-algorithm' 카테고리의 다른 글

[백준] 11050  (0) 2021.01.21
[백준] 4344  (0) 2021.01.21
[백준] 2750  (0) 2021.01.21
[백준] 2748  (0) 2021.01.21
[백준] 1546  (0) 2021.01.21

댓글