提交记录 16997
提交时间 |
评测时间 |
2021-11-26 16:38:08 |
2021-11-26 16:38:10 |
#include <cstdio>
#include <cctype>
const int N = 30;
int top, stk[N];
void read(int &x) {
x = 0;
bool f = false;
char ch = getchar();
while(!isdigit(ch)) {
if(ch == '-')
f = true;
ch = getchar();
}
while(isdigit(ch)) {
x = x * 10 + ch - '0';
ch = getchar();
}
if(f)
x = -x;
}
void write(int x) {
bool f = false;
if(x < 0) {
x = -x;
f = true;
}
do {
stk[++top] = x % 10;
x /= 10;
} while(x);
if(f)
putchar('-');
while(top)
putchar(stk[top--] + '0');
putchar('\n');
}
int main() {
int n;
read(n);
for(int i = 1, a, b; i <= n; ++i) {
read(a), read(b);
write(a + b);
}
return 0;
}
Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
Testcase #1 | 23.33 us | 12 KB | Accepted | Score: 100 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2024-11-23 23:23:17 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠