結果

問題 No.112 ややこしい鶴亀算
ユーザー oooooba
提出日時 2021-01-13 22:04:07
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 430 bytes
コンパイル時間 1,073 ms
コンパイル使用メモリ 91,312 KB
最終ジャッジ日時 2025-01-17 17:37:38
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <array>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <numeric>
#include <optional>
#include <vector>

using namespace std;

int main() {
    int32_t n;
    cin >> n;
    int32_t sum = 0;
    for (auto i = 0; i < n; ++i) {
        int32_t a;
        cin >> a;
        sum += a;
    }
    int32_t t = 2 * n - sum / (2 * n - 2);
    cout << t << " " << n - t << endl;
    return 0;
}
0