提交记录 4540


用户 题目 状态 得分 用时 内存 语言 代码长度
yussgrw 1000i. 【传统题】 A+B Problem Accepted 100 27.76 us 12 KB C++ 538 B
提交时间 评测时间
2018-07-25 11:41:36 2020-07-31 23:07:15
#include <cstdio>

inline int read() {
	register int x=0;
	register char c=getchar();
	int sym=1;
	while(c<'0'||c>'9') {
		if(c=='-') {
			sym=-1;
		}
		c=getchar();
	}
	while(c>='0'&&c<='9') {
		x=x*10+c-'0';
		c=getchar();
	}
	return x*sym;
}

inline void write(int x) {
	if(x>9) {
		write(x/10);
	}
	putchar(x%10+'0');
}

int main() {
	int n;
	n=read();
	int N;
	int a,b;
	int c;
	for(N=1;N<=n;N++) {
		a=read();b=read();
		c=a+b;
		if(c<0) {
			putchar('-');
			write(-c);
		} else {
			write(c);
		}
		putchar('\n');
	}
	return 0;
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #127.76 us12 KBAcceptedScore: 100


Judge Duck Online | 评测鸭在线
Server Time: 2024-03-29 01:43:33 | Loaded in 0 ms | Server Status
个人娱乐项目,仅供学习交流使用