提交记录 15836


用户 题目 状态 得分 用时 内存 语言 代码长度
BruceChen 1000i. 【传统题】 A+B Problem Accepted 100 25.84 us 12 KB C++ 767 B
提交时间 评测时间
2021-02-07 13:40:52 2021-02-07 13:40:53
#include <stdio.h>
#include <ctype.h>
inline int read() {
    static bool f;
    static char c;
    static int x;
    while (!isdigit(c = getchar()) && c != '-')
        ;
    x = (f = c == '-') ? 0 : c ^ 48;
    while (isdigit(c = getchar()))
        x = (x << 3) + (x << 1) + (c ^ 48);
    return f ? ~x + 1 : x;
}

inline void output(int x) {
    static char buf[30], *tail = buf;
    if (x == 0)
        putchar('0');
    else {
        if (x < 0) x = ~x + 1, putchar('-');
        for (; x; x /= 10) *++tail = (x % 10) ^ 48;
        for (; tail != buf; --tail) putchar(*tail);
    }
    putchar('\n');
}

int main() {
	register int n = read();
	while (n--) {
	    register int a = read();
	    register int b = read();
            output(a + b);
	}
	return 0;
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #125.84 us12 KBAcceptedScore: 100


Judge Duck Online | 评测鸭在线
Server Time: 2024-04-18 09:39:28 | Loaded in 0 ms | Server Status
个人娱乐项目,仅供学习交流使用