testcase = int(input())

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

1트

 

아 map 사용법이 잘못됨,,

map 밖에 int를 묶어주면 안됨

 

testcase = int(input())

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

2트 : 또안됨

 

for i in (t) :
TypeError: 'int' object is not iterable

 

계속 이 오류가 뜨는데

 

t = int(input())

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

결국 이게 끝

 

for문 쓸때 for과 in 안에있는 문자는 아무거나 가능 _ 이것도 가능

range를 써줘야함

->> map(int,input().split())

이거는 왜 아직 못외웠는지 의문

 

 

+ Recent posts