結果
| 問題 |
No.476 正しくない平均
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-05-09 13:55:13 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 379 bytes |
| コンパイル時間 | 440 ms |
| コンパイル使用メモリ | 54,136 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-14 20:01:11 |
| 合計ジャッジ時間 | 1,309 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 16 WA * 10 |
ソースコード
#include <iostream>
using namespace std;
#define MAX_INDEX 10
typedef long long ll;
int main() {
int n;ll a;
cin >> n >> a;
int i;
ll x[MAX_INDEX], sum=0, h;
for (i = 0;i<n; i++) {
cin >> x[i];
sum += x[i];
}
if (sum % n){
cout << "NO" << endl;
return 0;
}
(a == h) && (cout << "YES" << endl);
(a != h) && (cout << "NO" << endl);
return 0;
}