백준 10869번 : 사칙연산 (Python)

whyhy·2023년 7월 29일
0

[백준] Python

목록 보기
3/3

문제 / 입력 / 출력

풀이

a,b = map(int, input().split())

print(a+b)
print(a-b)
print(a*b)
print(a//b)
print(a%b)

Point

백준 1000번, 1001번과 동일

  • map() -> mapping function

  • input().split() -> input int. split

  • python은 나누기가 // | 나머지가 %

algorithm

입력받은 문자열을 쪼개고 -> 각각을 사칙연산 후 -> 출력

profile
킵고잉🐢

0개의 댓글