結果
| 問題 |
No.1406 Test
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-02-26 21:26:59 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 384 bytes |
| コンパイル時間 | 1,702 ms |
| コンパイル使用メモリ | 194,508 KB |
| 最終ジャッジ日時 | 2025-01-19 04:46:41 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 22 |
ソースコード
#include <bits/stdc++.h>
int main(){
std::cin.tie(0);
std::ios::sync_with_stdio(false);
int N; std::cin >> N;
std::vector<int> A(N - 1);
for(int i = 0; i < N - 1; ++i) std::cin >> A[i];
auto sum = std::accumulate(A.begin(), A.end(), 0);
int ans = 0;
for(int x = 0; x <= 100; ++x){
if((sum + x) % N == 0) ++ans;
}
std::cout << ans << "\n";
return 0;
}