結果
| 問題 | No.1406 Test | 
| コンテスト | |
| ユーザー |  Haa | 
| 提出日時 | 2021-02-26 21:21:49 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 486 bytes | 
| コンパイル時間 | 1,618 ms | 
| コンパイル使用メモリ | 168,564 KB | 
| 実行使用メモリ | 6,824 KB | 
| 最終ジャッジ日時 | 2024-10-02 13:46:39 | 
| 合計ジャッジ時間 | 2,251 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 22 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll,ll> P;
typedef vector<ll> VI;
typedef vector<VI> VVI;
#define REP(i,n) for(ll i=0;i<(n);i++)
#define ALL(v) v.begin(),v.end()
constexpr ll MOD=998244353;
constexpr ll INF=1e18;
int main(){
    int n; cin >> n;
    VI a(n-1); REP(i,n-1) cin >> a[i];
    int sum=0;
    REP(i,n-1) sum+=a[i];
    int ans=0;
    REP(i,101){
        if((sum+i)%n==0)
            ans++;
    }
    cout << ans << endl;
}
            
            
            
        