結果

問題 No.476 正しくない平均
ユーザー Tsukasa_TypeTsukasa_Type
提出日時 2018-02-10 15:25:43
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 326 bytes
コンパイル時間 1,995 ms
コンパイル使用メモリ 74,744 KB
実行使用メモリ 54,252 KB
最終ジャッジ日時 2024-04-21 14:40:00
合計ジャッジ時間 6,322 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
41,080 KB
testcase_01 WA -
testcase_02 AC 110 ms
41,080 KB
testcase_03 AC 115 ms
41,520 KB
testcase_04 AC 114 ms
39,900 KB
testcase_05 WA -
testcase_06 AC 107 ms
40,040 KB
testcase_07 AC 109 ms
41,204 KB
testcase_08 AC 102 ms
41,424 KB
testcase_09 AC 116 ms
41,264 KB
testcase_10 AC 117 ms
41,220 KB
testcase_11 WA -
testcase_12 AC 127 ms
41,120 KB
testcase_13 AC 114 ms
39,872 KB
testcase_14 AC 125 ms
41,176 KB
testcase_15 AC 124 ms
41,280 KB
testcase_16 AC 117 ms
40,064 KB
testcase_17 AC 117 ms
40,068 KB
testcase_18 AC 107 ms
41,436 KB
testcase_19 AC 116 ms
41,432 KB
testcase_20 WA -
testcase_21 AC 122 ms
41,176 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 117 ms
41,368 KB
testcase_25 AC 107 ms
41,636 KB
testcase_26 WA -
testcase_27 AC 120 ms
41,084 KB
testcase_28 AC 113 ms
41,116 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		int n =sc.nextInt();
		int a = sc.nextInt();
		long total = 0;
		for (int i=0; i<n; i++) {
			total += sc.nextInt();
		}
		long average = total/n;
		System.out.println(average==a?"YES":"NO");
	}
}
0