1
2
3
4
|
a,b,c=map(int, input().split())
ans=b-a
if ans%c ==0: print(ans//c)
else: print(ans//c +1)
|
cs |
처음에는 while로 구현했는데 시간초과나와서 간단한 사칙연산으로 바꿔 구현했습니다.
반응형
1
2
3
4
|
a,b,c=map(int, input().split())
ans=b-a
if ans%c ==0: print(ans//c)
else: print(ans//c +1)
|
cs |
처음에는 while로 구현했는데 시간초과나와서 간단한 사칙연산으로 바꿔 구현했습니다.
댓글