1 条题解

  • 1
    @ 2025-8-14 15:12:11
    #include <iostream>
    using namespace std;
    
    int main() {
        int n;
        cin >> n;
        int total = n * (n + 1) / 2;
        int input = 0;
        for (int i = 0; i < n - 1; ++i) {
            int x;
            cin >> x;
            input += x;
        }
        int number = total - input;
        cout << number << endl;
    
        return 0;
    }
    
    
    

    信息

    ID
    3096
    时间
    1000ms
    内存
    256MiB
    难度
    2
    标签
    递交数
    87
    已通过
    29
    上传者