#include <bits/stdc++.h>
using namespace std;
char ibuf[8192], *ied = ibuf + 8192, *ips = ied;
#define gc() ips == ied && (ied = (ips = ibuf) + fread(ibuf, 1, 8192, stdin), ips == ied) ? EOF : *ips ++
void read(int & x) {
x = 0; bool f = 0; char c = gc();
while (c < '0' || c > '9') {f |= c == '-'; c = gc();}
while (c >= '0' && c <= '9') {x = (x << 3) + (x << 1) + (c & 15); c = gc();}
x = !f ? x : -x;
}
char obuf[8192], *oed = obuf + 8192, *ops = obuf;
#define pc(x) (ops == oed && (ops = obuf) + fwrite(obuf, 1, 8192, stdout)), *ops ++ = x
#define flush() fwrite(obuf, 1, ops - obuf, stdout), ops = obuf, fflush(stdout)
void ps(const char *s) {while (*s) pc(*s ++);}
void write(int x) {
char stk[25], top = 0;
if (x < 0) pc('-'), x = -x;
if (x == 0) pc('0');
while (x) stk[top ++] = x - x / 10 * 10 + '0', x /= 10;
while (top) pc(stk[-- top]);
}
int main() {
int n; read(n);
while (n --) {int a, b; read(a); read(b); write(a + b); pc('\n');}
flush();
return 0;
}
Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
Testcase #1 | 45.33 us | 44 KB | Accepted | Score: 100 | 显示更多 |