提交记录 3080


用户 题目 状态 得分 用时 内存 语言 代码长度
chrogeek 1000i. 【传统题】 A+B Problem Accepted 100 22.93 us 12 KB C++11 695 B
提交时间 评测时间
2018-07-05 14:04:31 2020-07-31 21:11:02
#include <cstdio>
inline bool isdigit(char ch) {
	return ch >= '0' && ch <= '9';
}
inline void readint(int &num) {
	char ch = getchar();
	bool minus = false;
	for (; !isdigit(ch); ch = getchar()) {
		ch == '-' ? minus = true : 0;
	}
	for (; isdigit(ch); ch = getchar()) {
		(num *= 10) += ch - '0';
	}
	if (minus) num = -num;
}
int ch[20], a, b, n;
inline void putint(int &num) {
	if (num == 0) {
		putchar('0');
		return;
	}
	if (num < 0) putchar('-'), num = -num;
	int p = 0;
	while (num) ch[p++] = num % 10, num /= 10;
	while (p--) putchar('0' + ch[p]);
}
int main() {
	readint(n);
	while (n--) {
		a = b = 0;
		readint(a), readint(b);
		a += b;
		putint(a);
		putchar('\n');
	}
	return 0;
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #122.93 us12 KBAcceptedScore: 100


Judge Duck Online | 评测鸭在线
Server Time: 2024-11-23 23:02:21 | Loaded in 0 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠