Problem Statement

Missing Number

Implementation


void solve() {
    ll n;
    cin >> n;

    ll ans = (n * (n + 1)) / 2;
    debug(n, ans);
    rep(i, n - 1) {
        ll x;
        cin >> x;
        ans -= x;
    }

    cout << ans << "\n";

}