結果

問題 No.1406 Test
ユーザー shirokami
提出日時 2021-04-14 14:29:13
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 711 bytes
コンパイル時間 2,003 ms
コンパイル使用メモリ 196,748 KB
最終ジャッジ日時 2025-01-20 17:31:05
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#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