python-algorithm

[백준] 8710

무적김두칠 2021. 3. 4. 10:51

1
2
3
4
a,b,c=map(int, input().split())
ans=b-a
if ans%c ==0print(ans//c)
elseprint(ans//+1)
cs

처음에는 while로 구현했는데 시간초과나와서 간단한 사칙연산으로 바꿔 구현했습니다.

반응형