結果
問題 | No.1586 Equal Array |
ユーザー |
|
提出日時 | 2021-09-04 20:23:26 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 53 ms / 1,000 ms |
コード長 | 324 bytes |
コンパイル時間 | 1,975 ms |
コンパイル使用メモリ | 195,128 KB |
最終ジャッジ日時 | 2025-01-24 08:04:47 |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#include<bits/stdc++.h> using namespace std; using ll = long long; int main(){ ll n; cin >> n; vector<ll> a(n); ll mod_sum = 0; for(int i=0;i < n;i++){ cin >> a[i]; mod_sum += (a[i] % n); mod_sum %= n; } cout << (mod_sum == 0 ? "Yes" : "No") << endl; return 0; }