結果

問題 No.1406 Test
ユーザー morimariomorimario
提出日時 2021-02-26 21:34:00
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 3,613 bytes
コンパイル時間 4,343 ms
コンパイル使用メモリ 256,372 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-10 12:09:16
合計ジャッジ時間 4,788 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,812 KB
testcase_01 AC 2 ms
6,940 KB
testcase_02 AC 2 ms
6,940 KB
testcase_03 AC 2 ms
6,944 KB
testcase_04 AC 2 ms
6,940 KB
testcase_05 AC 2 ms
6,944 KB
testcase_06 AC 1 ms
6,940 KB
testcase_07 AC 2 ms
6,940 KB
testcase_08 AC 2 ms
6,940 KB
testcase_09 AC 2 ms
6,944 KB
testcase_10 AC 1 ms
6,944 KB
testcase_11 AC 2 ms
6,944 KB
testcase_12 AC 2 ms
6,940 KB
testcase_13 AC 2 ms
6,940 KB
testcase_14 AC 2 ms
6,944 KB
testcase_15 AC 1 ms
6,940 KB
testcase_16 AC 1 ms
6,948 KB
testcase_17 AC 2 ms
6,940 KB
testcase_18 AC 2 ms
6,940 KB
testcase_19 AC 2 ms
6,940 KB
testcase_20 AC 2 ms
6,944 KB
testcase_21 AC 1 ms
6,944 KB
testcase_22 AC 1 ms
6,940 KB
testcase_23 AC 2 ms
6,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
using ll = long long; using ull = unsigned long long; using pil = pair<int, ll>; using pli = pair<ll, int>;
using pii = pair<int, int>; using vi = vector<int>; using vvi = vector<vi>; using vvvi = vector<vvi>;
using pll = pair<ll, ll>; using vl = vector<ll>; using vvl = vector<vl>; using vvvl = vector<vvl>;
using pbb = pair<bool, bool>; using vb = vector<bool>; using vvb = vector<vb>; using vvvb = vector<vvb>;
using pcc = pair<char, char>; using vc = vector<char>; using vvc = vector<vc>; using vvvc = vector<vvc>;
using pss = pair<string, string>; using vs = vector<string>; using vvs = vector<vs>; using vvvs = vector<vvs>;
using pdd = pair<double, double>; using vd = vector<double>; using vvd = vector<vd>; using vvvd = vector<vvd>;
template <typename T> using pq = priority_queue<T, vector<T>>; template <typename T> using pql = priority_queue<T, vector<T>, greater<T>>;
#define rep0(times) for(int counter = 0; counter < (int)(times); ++counter)
#define rep(counter, goal) for (int counter = 0; counter < (int)(goal); ++counter)
#define rep2(counter, start, goal) for (int counter = (int)(start); counter < (int)(goal); ++counter)
#define rep3(counter, start, goal) for (int counter = (int)(start); counter > (int)(goal); --counter)
#define all(container) begin(container), end(container)
template <typename T> bool chmax(T &x, const T &y) { if (x < y) { x = y; return true; } return false; }
template <typename T> bool chmin(T &x, const T &y) { if (x > y) { x = y; return true; } return false; }
void Yn(bool flag) { cout << (flag ? "Yes" : "No") << "\n"; }
void yn(bool flag) { cout << (flag ? "yes" : "no") << "\n"; }
void YN(bool flag) { cout << (flag ? "YES" : "NO") << "\n"; }
void set_prec(const int &digits) { cout << fixed << setprecision(digits); cerr << fixed << setprecision(digits); }
template <typename T> T INF() { return numeric_limits<T>::max(); }
#include <atcoder/all>
using namespace atcoder;
// using mint = atcoder::modint1000000007;
using mint = atcoder::modint998244353;
// using mint = atcoder::modint;
using pmm = pair<mint, mint>; using vm = vector<mint>; using vvm = vector<vm>; using vvvm = vector<vvm>;
void pr(const mint &obj) { cerr << obj.val(); }
template <typename T> void pr(const T &obj) { cerr << obj; }
template <typename T, typename ...Ts> void pr(const T &first, const Ts &...rest) { pr(first); pr(", "); pr(rest...); }
template <typename S, typename T> void pr(const pair<S, T> &pair) { pr("("); pr(pair.first); pr(", "); pr(pair.second); pr(")"); }
template <typename T> void pr(const vector<T> &vec) { pr("{"); for (T obj : vec) { pr(obj); pr(", "); } pr("}"); }
template <typename T> void pr(const vector<vector<T>> &vv) { pr("\n"); rep(index, vv.size()) { pr("["); pr(index); pr("]: "); pr(vv[index]); pr("\n"); } }
template <typename T> void pr(const set<T> &vec) { pr("{"); for (T obj : vec) { pr(obj); pr(", "); } pr("}"); }
template <typename S, typename T> void pr(const map<S, T> &map) { pr("{"); for (pair<S, T> pair : map) { pr("("); pr(pair.first); pr(": "); pr(pair.second); pr("), "); } pr("}"); }
#define db(obj) cerr << #obj << ": "; pr(obj); cerr << " "
#define dl(obj) db(obj); cerr << "\n"
#define dm(...) cerr << "(" << #__VA_ARGS__ << "): ("; pr(__VA_ARGS__); cerr << ") "
#define dml(...) dm(__VA_ARGS__); cerr << "\n"
// const ll MOD = 1000000007;
// const ll MOD = 998244353;

int main() {
	int N; cin >> N;
	vi A(N - 1); rep(i, N - 1) cin >> A[i];
	int sum = accumulate(all(A), 0);
	int ans = 0;
	rep(x, 101) if ((sum + x) % N == 0) ++ans;
	cout << ans << endl;
}
0