結果

問題 No.476 正しくない平均
ユーザー Yasufu12
提出日時 2017-01-27 22:34:54
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 260 bytes
コンパイル時間 465 ms
コンパイル使用メモリ 54,140 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-12-23 16:21:40
合計ジャッジ時間 1,309 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
using namespace std;

int n, a, x;
long long sum = 0;

int main(){

	cin >> n >> a;

	for (int i = 0; i < n; i++){
		cin >> x;
		
		sum += x;
	}

	if (sum == a * n){
		cout << "YES";
	}
	else{
		cout << "NO";
	}

	cout << "\n";

	return 0;
}
0