結果
問題 | No.1406 Test |
ユーザー |
![]() |
提出日時 | 2021-02-26 21:22:16 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 470 bytes |
コンパイル時間 | 1,658 ms |
コンパイル使用メモリ | 194,000 KB |
最終ジャッジ日時 | 2025-01-19 04:42:36 |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 22 |
ソースコード
#include "bits/stdc++.h"using namespace std;using ll = long long;using P = pair<ll, ll>;const ll INF = (1LL << 61);ll mod = 1000000007;signed main() {ios::sync_with_stdio(false);cin.tie(0);int N; cin >> N;vector<int>A(N - 1);for (int i = 0; i < N - 1; i++) {cin >> A[i];}int sum = 0;for (int i = 0; i < N - 1; i++)sum += A[i];int ans = 0;for (int i = 0; i <= 100; i++) {if ((sum + i) % N == 0)ans++;}cout << ans << endl;return 0;}