結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
50,056 KB
testcase_01 AC 54 ms
49,864 KB
testcase_02 AC 55 ms
50,408 KB
testcase_03 AC 54 ms
50,268 KB
testcase_04 AC 54 ms
50,156 KB
testcase_05 AC 55 ms
50,420 KB
testcase_06 AC 54 ms
50,420 KB
testcase_07 AC 54 ms
49,796 KB
testcase_08 AC 55 ms
49,908 KB
testcase_09 AC 56 ms
50,312 KB
testcase_10 AC 55 ms
50,316 KB
testcase_11 AC 56 ms
49,952 KB
testcase_12 AC 56 ms
50,340 KB
testcase_13 AC 55 ms
50,304 KB
testcase_14 AC 56 ms
50,264 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 53 ms
50,040 KB
testcase_19 AC 53 ms
50,036 KB
testcase_20 AC 53 ms
50,300 KB
testcase_21 WA -
testcase_22 AC 53 ms
50,208 KB
testcase_23 AC 53 ms
50,164 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 54 ms
50,168 KB
testcase_27 WA -
testcase_28 AC 53 ms
50,348 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 * Long.parseLong(t[1]) == sum ? "YES" : "NO");
	}
}
0