본문 바로가기
Algorithm

[구현/수학] 백준 7891 Can you add this? - 파이썬(Python)

by jangThang 2022. 12. 7.
반응형

백준 온라인 저지

 

[ Contents ]

     

     

    1. 문제 (링크 참조)

     

    7891번: Can you add this?

    The input contains several test cases. The first line contains and integer t (t ≤ 100) denoting the number of test cases. Then t tests follow, each of them consisiting of two space separated integers x and y (−109 ≤ x, y ≤ 109).

    www.acmicpc.net

     

     

     

    2. 문제 풀이

      두 수가 주어집니다. 그 수를 모두 더한 값을 출력합니다.

     

     

     

    3. 코드

    # 입력
    Q = int(input())
    for _ in range(Q):
        a, b = map(int, input().split())
        print(a+b)

     

     

    star가 되고나서 Tistory

    반응형

    댓글