結果

問題 No.476 正しくない平均
ユーザー Naoki00712
提出日時 2023-06-02 09:02:18
言語 C
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 243 bytes
コンパイル時間 312 ms
コンパイル使用メモリ 28,288 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-28 15:29:17
合計ジャッジ時間 1,434 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 25 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>

int main()
{
	int n, a;
	scanf("%d%d", &n, &a);

	int sum = 0;

	for (int i = 0; i < n; i++)
	{
		int x;
		scanf("%d", &x);
		sum += x;
	}

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

	return 0;
}
0