結果

問題 No.1406 Test
コンテスト
ユーザー shirokami
提出日時 2021-04-14 14:29:13
言語 C++17
(gcc 15.3.0 + boost 1.92.0 + ACL)
コンパイル:
g++-15 -O2 -lm -std=c++17 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 1 ms / 2,000 ms
+ 939µs
コード長 711 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,606 ms
コンパイル使用メモリ 212,444 KB
実行使用メモリ 9,748 KB
最終ジャッジ日時 2026-10-19 23:43:39
合計ジャッジ時間 3,060 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge5_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("O0")
typedef long long int ll;
typedef long double ld;
const ll mod = 1e9+7;
const ll INF = 1e18;
#define rep(i,n) for (ll i = 0; i < (n); ++i)
#define Rep(i,a,n) for (ll i = (a); i < (n); ++i)
#define All(a) (a).begin(),(a).end()
#define Pi acos(-1)
using Graph = vector<vector<ll>>;
using V = vector<ll>;
using P = pair<ll,ll>;

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << setprecision(15) << fixed;

  ll n;
  cin >> n;
  V a(n-1);
  ll t = 0;
  rep(i,n-1) {
    cin >> a[i];
    t += a[i];
  }
  ll ans = 0;
  rep(i,101) {
    ll s = t + i;
    if (s % n == 0) {
      ++ans;
    }
  }
  cout << ans << '\n';
}
0