코딩모음zip/파이썬

[Python3] 백준코딩 10869번 사칙연산 파이썬 풀이

키윙 2023. 1. 3. 11:13

Python 코드 정답

A, B = input().split()
A = int(A)
B = int(B)
print(A+B)
print(A-B)
print(A*B)
print(int(A/B))
print(A%B)

 

Python 코드 풀이

  • 나눗셈에서 소수점을 제외하고 출력하는 법을 몰랐음.

소숫점을 제외하고 출력하고 싶을 때 정수형으로 출력하면 됨.