본문 바로가기
공부/알고리즘

[알고리즘][백준] 10824번 네 수 - 파이썬(python) 풀이

by 무명오리 2024. 2. 27.

https://www.acmicpc.net/problem/10824

 

10824번: 네 수

첫째 줄에 네 자연수 A, B, C, D가 주어진다. (1 ≤ A, B, C, D ≤ 1,000,000)

www.acmicpc.net

 


split()하면 자동으로 list에 넣어지고 넣어질때 문자형 타입이라 바로 더하고 int()해주면 끝!

import sys

input = sys.stdin.readline().split()

print(int(input[0] + input[1]) + int(input[2] + input[3]))