[백준]B3-1333

py_code·2021년 1월 8일
0

백준-브론즈3

목록 보기
28/38

n,l,d = map(int, input().split())
t, ans = 0,d
for _ in range(n):
    if t<=ans<t+l:
        while ans<t+l:ans+=d
    if t+l<=ans<t+l+5:
        break
    t+=l+5
print(ans)
profile
개발자를 꿈꿉니다.

0개의 댓글