num = sum(list(map(int, input().split(' '))))
print(num)
Python 1000번 풀이
map(int, input().split(' '))
으로 두 숫자를 입력받은 뒤
list(map(int, input().split(' ')))
로 입력받은 두 숫자를 배열로 만들어준뒤 sum 해줍니다.
print(num)
마지막으로 print 해줍니다.
'백준 > Python' 카테고리의 다른 글
[백준] 1094번 Python - 막대기 (0) | 2022.10.14 |
---|---|
[백준] 1676번 Python- 팩토리얼 0의 개수 (0) | 2022.10.14 |
[백준] 10156번 Python- 과자 (0) | 2022.10.13 |
[백준] 2675번 Python - 문자열 반복 (0) | 2022.10.13 |
[백준] 1712번 Python - 손익분기점 (0) | 2022.10.12 |