結果
問題 | No.1406 Test |
ユーザー |
![]() |
提出日時 | 2021-02-26 21:23:30 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 863 bytes |
コンパイル時間 | 1,471 ms |
コンパイル使用メモリ | 167,392 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-02 13:51:36 |
合計ジャッジ時間 | 2,313 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 22 |
ソースコード
#include <bits/stdc++.h>using namespace std;#define rep(i, a, n) for (int i = a; i < n; i++) //iをaからn#define per(i, n, a) for (int i = a - 1; i >= n; i--) //iをaからn#define db(x) cout << #x << " = " << x << endl#define db2(x, y) cout << "(" << #x << ", " << #y << ") = (" << x << ", " << y << ")\n"; //デバッグ用#define all(x) (x).begin(), (x).end()#define pb push_back#define F first#define S second//sort(all(a)); ソート//sort(all(a),greater<int>()); 逆順ソート//a.erase(unique(all(a)), a.end()); ソート後に重複を削除typedef long long ll;//const ll mod=1000000007;int main(){int n;cin>>n;int sumsum=0;int a;int nn=n-1;while(nn--){cin>>a;sumsum+=a;}int ans=0;rep(i,0,101){if((sumsum+i)%n==0)ans++;}cout<<ans<<endl;return 0;}