提交记录 11186


用户 题目 状态 得分 用时 内存 语言 代码长度
denverjin 1000i. 【传统题】 A+B Problem Accepted 100 16.16 us 20 KB C++ 1008 B
提交时间 评测时间
2019-11-03 09:57:54 2020-08-01 02:39:50
#include <cstdio>

char ibuf[32768], *ips = ibuf + 32768;
char gc() {
	if (ips == ibuf + 32768) fread(ips = ibuf, 1, 32768, stdin);
	return *ips ++;
}
void gs(char *s) {
	while ((*s = gc()) <= 32) ;
	while ((*s ++ = gc()) > 32) ;
	*s = 0;
}
void read(int &x) {
	x = 0; bool f = 0; char c = gc();
	while (c <= 32) c = gc(); if (c == '-') f = 1, c = gc();
	while (c > 32) {x = (x << 3) + (x << 1) + (c ^ 48); c = gc();}
	x = !f ? x : -x;
}
char obuf[32768], *ops = obuf;
void pc(char x) {
	if (ops == obuf + 32768) fwrite(ops = obuf, 1, 32768, stdout);
	*ops ++ = x;
}
void flush() {fwrite(obuf, 1, ops - obuf, stdout); ops = obuf;}
void ps(const char *s) {while (*s) pc(*s ++);}
void write(int x) {
	static char ostk[25]; int otp = 0;
	if (x < 0) pc('-'), x = -x; if (x == 0) pc('0');
	while (x) ostk[otp ++] = x % 10 + '0', x /= 10;
	while (otp) pc(ostk[-- otp]);
}

int main() {
	int n; read(n);
	for (int i = 0; i < n; ++ i) {
		int a, b; read(a); read(b);
		write(a + b); pc(10);
	}
	flush();
	return 0;
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #116.16 us20 KBAcceptedScore: 100


Judge Duck Online | 评测鸭在线
Server Time: 2026-03-28 05:05:39 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠