https://www.acmicpc.net/problem/16428
1
2
3
4
5
6
7
8
9
10
11
|
def sol(a, b):
if b <=0:
return -(a//(-b)), a%(-b)
else:
return a//b, a%b
if __name__ == '__main__':
a, b =map(int,input().split())
q ,r =sol(a,b)
print(q)
print(r)
|
cs |
반응형
'python-algorithm' 카테고리의 다른 글
백준 26004 HI-ARC (0) | 2022.12.28 |
---|---|
백준 10698 Ahmed Aly (0) | 2022.12.28 |
백준 4806 줄 세기 (0) | 2022.12.26 |
백준 17094 Serious Problem (0) | 2022.12.26 |
백준 17010 Time to Decompress (0) | 2022.12.26 |
댓글