結果

問題 No.1406 Test
ユーザー take000
提出日時 2021-05-08 20:51:38
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 30 ms / 2,000 ms
コード長 389 bytes
コンパイル時間 2,634 ms
コンパイル使用メモリ 191,300 KB
最終ジャッジ日時 2025-01-21 09:28:15
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; ++i)
typedef long long ll;
using namespace std;

int main() {
    int N;
    cin >> N;

    int sum = 0;
    rep(i, N - 1) {
        int a;
        cin >> a;
        sum += a;
    }

    int ans = 0;
    for (int a = 0; a <= 100; ++a) {
        if ((sum + a) % N == 0) ans++;
    }
    cout << ans << endl;

    return 0;
}
0