結果

問題 No.476 正しくない平均
ユーザー fal_rndfal_rnd
提出日時 2017-01-27 22:24:30
言語 Java19
(openjdk 21)
結果
AC  
実行時間 141 ms / 2,000 ms
コード長 304 bytes
コンパイル時間 3,316 ms
コンパイル使用メモリ 71,908 KB
実行使用メモリ 56,392 KB
最終ジャッジ日時 2023-08-25 22:27:35
合計ジャッジ時間 8,466 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 138 ms
55,780 KB
testcase_01 AC 138 ms
56,020 KB
testcase_02 AC 139 ms
55,908 KB
testcase_03 AC 138 ms
56,344 KB
testcase_04 AC 138 ms
55,960 KB
testcase_05 AC 139 ms
55,864 KB
testcase_06 AC 138 ms
56,152 KB
testcase_07 AC 138 ms
56,384 KB
testcase_08 AC 136 ms
55,976 KB
testcase_09 AC 136 ms
56,348 KB
testcase_10 AC 139 ms
56,212 KB
testcase_11 AC 140 ms
56,224 KB
testcase_12 AC 138 ms
56,276 KB
testcase_13 AC 139 ms
56,340 KB
testcase_14 AC 139 ms
55,840 KB
testcase_15 AC 140 ms
55,872 KB
testcase_16 AC 139 ms
55,600 KB
testcase_17 AC 141 ms
56,064 KB
testcase_18 AC 140 ms
56,392 KB
testcase_19 AC 138 ms
56,068 KB
testcase_20 AC 140 ms
56,196 KB
testcase_21 AC 139 ms
55,996 KB
testcase_22 AC 139 ms
56,100 KB
testcase_23 AC 140 ms
55,932 KB
testcase_24 AC 140 ms
56,372 KB
testcase_25 AC 136 ms
56,056 KB
testcase_26 AC 137 ms
56,152 KB
testcase_27 AC 137 ms
56,016 KB
testcase_28 AC 138 ms
55,864 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicodercontest155;

import java.util.*;
public class A{
	static Scanner s = new Scanner(System.in);
	public static void main(String[] args) {
		int n=s.nextInt();
		double a=s.nextDouble();
		long l=0;
		for(int i=0;i<n;i++) l+=s.nextLong();

		System.out.println((a==l*1.0/n)?"YES":"NO");
	}
}
0