結果

問題 No.1406 Test
ユーザー nao109
提出日時 2022-12-08 00:37:42
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 361 bytes
コンパイル時間 1,777 ms
コンパイル使用メモリ 193,020 KB
最終ジャッジ日時 2025-02-09 06:20:32
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define fi first
#define se second
#define all(a) a.begin(),a.end()
int main(){
  int n;
  cin >> n;

  int sum=0;
  for(int i=0; i<n-1; ++i){
    int a;
    cin >> a;
    sum+=a;
  }
  int ans=0;
  for(int i=0; i<=100; ++i){
    if((sum+i)%n==0) ans++;
  }
  cout << ans << endl;
  return 0;
}
0