입출력에 여러가지 방법을 적용해 풀어보겠다.
A, B = map(int, input().split(" "))
print(A+B)
print(A-B)
print(A*B)
print(A//B)
print(A%B)
A, B = map(int, input().split(" "))
def operation(A, B):
print(A+B, A-B, A*B, A//B, A%B, end="\n")
operation(A, B)
짧은 문에서는 print를 사용하는 것도 좋지만, 기왕이면 함수를 이용하는 것이 객체지향적으로 프로그래밍을 하는 좋은 연습이 될 것이다.