백준 #10953 A+B – 6
아주 쉬운 문제
#include <iostream>
#include <cstdio>
using namespace std;
int T;
void consumeBuffer() {
while(getchar() != '\n') {}
}
int main() {
cin >> T;
consumeBuffer();
for(int i = 0; i < T; i++) {
int a, b;
a = (int)getchar() - '0';
getchar();
b = (int)getchar() - '0';
consumeBuffer();
cout << a + b << '\n';
}
return 0;
}
Comments