結果
| 問題 |
No.476 正しくない平均
|
| コンテスト | |
| ユーザー |
かぼちゃ
|
| 提出日時 | 2018-03-25 00:40:14 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 351 bytes |
| コンパイル時間 | 442 ms |
| コンパイル使用メモリ | 60,136 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-25 03:23:08 |
| 合計ジャッジ時間 | 1,521 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 WA * 9 |
ソースコード
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
int n,a;
cin >> n >> a;
float ave = 0;
for(int i = 1;i <= n;i++){
int x;
cin >> x;
ave += x;
}
ave /= n;
if(ave == a) cout << "YES" << endl;
else cout << "NO" << endl;
return 0;
}
かぼちゃ