Dev 달팽이 @_''

[파이썬] 백준 10953번 : A+B - 6 본문

PS/Python

[파이썬] 백준 10953번 : A+B - 6

다본죽 2021. 2. 5. 00:29

출처 : www.acmicpc.net/problem/10953

 

10953번: A+B - 6

두 정수 A와 B를 입력받은 다음, A+B를 출력하는 프로그램을 작성하시오.

www.acmicpc.net

split(',')을 이용하여 문자열을 ',' 기준으로 나누었다.

1
2
3
4
5
6
7
8
9
10
11
= int(input())
arr = []
for i in range(T):
    s = input()
    arr.append(s)
    
for s in arr:
    tmp = s.split(',')
    total = int(tmp[0])+int(tmp[1])
    print(total)
 
cs