#include<iostream>


using namespace std;


int main(void) {

int T;

cin.tie(NULL);

ios_base::sync_with_stdio(false);

cin >> T;

while (T--) {

int a, b;

cin >> a >> b;

cout << a + b << "\n";

}

return 0;

}



코드에 이 두 문장 추가

cin.tie(NULL);

ios_base::sync_with_stdio(false);



줄바꿈은 endl이 아닌 "\n" 사용하면 좋다. endl을 사용하면 버퍼를 비우고, 그 오버헤드는 생각보다 크다!


반응형

+ Recent posts