BOJ/백준-10953-python

cosmos·2022년 3월 3일
0
post-thumbnail

문제

풀이

  • split 함수로 "," 로 구분하여 수를 입력받은 뒤, 두 수를 합하여 출력해주면 된다.

코드

# https://www.acmicpc.net/problem/10953
# boj, 10953: a+b-6, python3
import sys

input = sys.stdin.readline

def solve(test_case: list):
    for x, y in test_case:
        print(x+y)

if __name__ == '__main__':
    t = int(input())
    test_case = [list(map(int, input().split(','))) for _ in range(t)]

    solve(test_case)

결과

출처 & 깃허브

BOJ 10953
GITHUB

0개의 댓글