반응형
[ 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)
반응형
'Algorithm' 카테고리의 다른 글
[구현/수학] 백준 16546 Missing Runners - 파이썬(Python) (0) | 2023.01.07 |
---|---|
[구현/수학] 백준 10180 Ship Selection - 파이썬(Python) (1) | 2023.01.06 |
[구현/수학] 백준 23811 골뱅이 찍기 - ㅌ - 파이썬(Python) (0) | 2023.01.04 |
[구현/수학] 백준 13240 Chessboard - 파이썬(Python) (0) | 2023.01.03 |
[구현/수학] 백준 4714 Lunacy - 파이썬(Python) (0) | 2023.01.02 |
댓글