728x90
반응형
단순 사칙연산 문제이다.
a, b = map(int, input().split())
c, d = divmod(a, b)
if a != 0 and b < 0:
c, d = c+1, d-b
print(c)
print(d)
728x90
반응형
'Agorithm > 백준 알고리즘' 카테고리의 다른 글
백준 알고리즘 16486번 운동장 한 바퀴(python) (0) | 2021.02.08 |
---|---|
백준 알고리즘 16431번 베시와 데이지(python) (0) | 2021.02.08 |
백준 알고리즘 16204번 카드 뽑기(python) (0) | 2021.02.08 |
백준 알고리즘 16199번 나이 계산하기(python) (0) | 2021.02.08 |
백준 알고리즘 16017번 Telemarketer or not?(python) (0) | 2021.02.08 |