본문 바로가기
Algorithm

[구현/수학] 백준 18398 HOMWRK - 파이썬(Python)

by jangThang 2023. 1. 5.
반응형

백준 온라인 저지

 

[ Contents ]

     

     

    1. 문제 (링크 참조)

     

    18398번: HOMWRK

    In one of the beautiful cities of Afghanistan two sisters are going to program a simple game to help them solve their mathematics homework. Their homework asks them to calculate the sum and multiplication of two numbers. Your task is to help them to build

    www.acmicpc.net

     

     

    2. 문제 풀이

     두 수의 합과 곱을 출력합니다.

     

     

     

    3. 코드

    T = int(input())
    for i in range(T):
        N = int(input())
        for j in range(N):
            a, b = map(int, input().split())
            print(a+b, a*b)

     

     

    star가 되고나서 Tistory

    반응형

    댓글