提交记录 12975


用户 题目 状态 得分 用时 内存 语言 代码长度
tootal 1000i. 【传统题】 A+B Problem Accepted 100 45.02 us 40 KB C++11 1.05 KB
提交时间 评测时间
2020-07-15 23:00:30 2020-08-01 03:02:27
#include <bits/stdc++.h>
using namespace std;
struct Read {
    static const int N = 15 * 201;
    char s[N], *p;
    int c;
    Read() { c = fread(s, 1, N, stdin), p = s; }
    int operator()(int &x) {
        while (*p != '-' && (*p < '0' || *p > '9')) p++;
        if (p == s + c) return 0;
        bool sgn = false;
        if (*p == '-') sgn = true, p++;
        for (x = 0; *p >= '0' && *p <= '9'; p++) x = x * 10 + *p - '0';
        if (sgn) x = -x;
        return 1;
    }
} read;
struct Write {
    char s[int(15 * 100)];
    int c = 0, p;
    void operator()(char x) { s[c++] = x; }
    void operator()(int x) {
        if (x < 0) x = -x, s[c++] = '-';
        for (p = c; s[c++] = x % 10 + '0', x /= 10;);
        reverse(s + p, s + c);
    }
    template <typename T, typename... S>
    void operator()(T x, S... y) {
        return (*this)(x), (*this)(y...);
    }
    ~Write() { fwrite(s, 1, c, stdout); }
} write;
int main() {
    int n;
    read(n);
    while (n--) {
        int a, b;
        read(a), read(b);
        write(a + b, '\n');
    }
    return 0;
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #145.02 us40 KBAcceptedScore: 100


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