結果
問題 |
No.476 正しくない平均
|
ユーザー |
![]() |
提出日時 | 2017-01-29 11:57:23 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 294 bytes |
コンパイル時間 | 453 ms |
コンパイル使用メモリ | 55,516 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-23 23:06:36 |
合計ジャッジ時間 | 1,807 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 RE * 2 |
ソースコード
#include <iostream> #define int long long using namespace std; int n, a, x; signed main() { int ssum = 0; cin >> n >> a; for (int i = 0; i < n; i++) { cin >> x; ssum += x; } if (ssum % a != 0 || ssum / n != a) { cout << "NO" << endl; } else { cout << "YES" << endl; } return 0; }