알고리즘/백준 - 파이썬

백준) 7891번 Can you add this? (파이썬)

AI Sonny 2022. 6. 25. 10:04
728x90

문제) Given two integers, calculate and output their sum.

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

이번 문제는 숫자 2개가 주어진면 더하는 문제로 난이도가 쉬운 편이다.

 

for 문을 활용해서 입력된 a의 값만큼 반복해서 숫자를 더한다.

 

이해가 안되시거나 틀린 정보는 댓글로 알려주시면 감사하겠습니다!

728x90