結果

問題 No.476 正しくない平均
ユーザー YOSHIYOSHI
提出日時 2021-03-16 22:31:24
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 535 bytes
コンパイル時間 3,776 ms
コンパイル使用メモリ 74,440 KB
実行使用メモリ 50,420 KB
最終ジャッジ日時 2024-04-26 05:20:23
合計ジャッジ時間 5,719 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
36,916 KB
testcase_01 AC 52 ms
36,952 KB
testcase_02 AC 51 ms
36,916 KB
testcase_03 AC 52 ms
36,672 KB
testcase_04 AC 50 ms
37,212 KB
testcase_05 AC 51 ms
37,156 KB
testcase_06 AC 51 ms
37,084 KB
testcase_07 AC 50 ms
37,112 KB
testcase_08 AC 50 ms
36,800 KB
testcase_09 AC 50 ms
36,800 KB
testcase_10 AC 50 ms
36,800 KB
testcase_11 AC 50 ms
37,176 KB
testcase_12 AC 50 ms
37,060 KB
testcase_13 AC 52 ms
36,956 KB
testcase_14 AC 51 ms
36,980 KB
testcase_15 AC 51 ms
37,176 KB
testcase_16 AC 50 ms
37,008 KB
testcase_17 AC 51 ms
37,112 KB
testcase_18 AC 50 ms
36,684 KB
testcase_19 WA -
testcase_20 AC 51 ms
37,092 KB
testcase_21 AC 50 ms
37,024 KB
testcase_22 AC 51 ms
37,148 KB
testcase_23 AC 50 ms
37,220 KB
testcase_24 AC 50 ms
36,716 KB
testcase_25 AC 49 ms
37,152 KB
testcase_26 AC 49 ms
36,952 KB
testcase_27 AC 49 ms
37,176 KB
testcase_28 AC 49 ms
37,212 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class No00000476_Main {
	static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	public static void main(String[] args) throws IOException {
		String[] t = br.readLine().split(" ");
		int n = Integer.parseInt(t[0]);
		String[] x = br.readLine().split(" ");
		int sum = 0;
		for(int i = 0; i < n; i++) sum += Integer.parseInt(x[i]);
		System.out.println(n * Integer.parseInt(t[1]) == sum ? "YES" : "NO");
	}
}
0