提交记录 8699


用户 题目 状态 得分 用时 内存 语言 代码长度
SorahISA 1000i. 【传统题】 A+B Problem Accepted 100 66.27 us 16 KB C++ 456 B
提交时间 评测时间
2019-03-05 18:56:44 2020-08-01 01:23:21
#include <stdio.h>

int main() {
	int n;
	scanf("%d", &n);
	for (int i = 1; i <= n; i++) {
		int a, b; scanf("%d %d", &a, &b);
                int ans = a;
                while ( b > 10000000 ) { b -= 1000000; ans += 1000000; }
                while ( b < -10000000 ) { b += 1000000; ans -= 1000000; }
                while ( b > 0 ) { b-- ; ans++ ; }
                while ( b < 0 ) { b++ ; ans-- ; }
                printf("%d\n", ans);
	}
	return 0;
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #166.27 us16 KBAcceptedScore: 100


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