結果

問題 No.476 正しくない平均
ユーザー chankou0920chankou0920
提出日時 2017-11-09 00:54:15
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 58 ms / 2,000 ms
コード長 480 bytes
コンパイル時間 2,142 ms
コンパイル使用メモリ 102,592 KB
実行使用メモリ 22,800 KB
最終ジャッジ日時 2023-08-15 21:22:47
合計ジャッジ時間 4,953 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
20,688 KB
testcase_01 AC 57 ms
22,752 KB
testcase_02 AC 57 ms
22,628 KB
testcase_03 AC 57 ms
20,704 KB
testcase_04 AC 56 ms
20,832 KB
testcase_05 AC 56 ms
22,684 KB
testcase_06 AC 57 ms
22,672 KB
testcase_07 AC 56 ms
20,704 KB
testcase_08 AC 57 ms
20,600 KB
testcase_09 AC 56 ms
20,784 KB
testcase_10 AC 56 ms
20,672 KB
testcase_11 AC 58 ms
20,812 KB
testcase_12 AC 56 ms
18,868 KB
testcase_13 AC 56 ms
22,744 KB
testcase_14 AC 56 ms
22,792 KB
testcase_15 AC 57 ms
22,672 KB
testcase_16 AC 56 ms
20,780 KB
testcase_17 AC 56 ms
22,752 KB
testcase_18 AC 56 ms
20,696 KB
testcase_19 AC 56 ms
20,600 KB
testcase_20 AC 56 ms
22,800 KB
testcase_21 AC 56 ms
20,812 KB
testcase_22 AC 57 ms
22,744 KB
testcase_23 AC 56 ms
22,740 KB
testcase_24 AC 56 ms
22,728 KB
testcase_25 AC 57 ms
20,648 KB
testcase_26 AC 57 ms
20,688 KB
testcase_27 AC 57 ms
20,824 KB
testcase_28 AC 56 ms
22,732 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

public class Program {
	public void Solve() {
		string[] s = Console.ReadLine().Split(' ');
		string[] x = Console.ReadLine().Split(' ');
		int a = int.Parse(s[1]);
		long sum = 0;
		for (int i = 0; i < x.Length; i++) {
			sum += int.Parse(x[i]);
		}
		if (a == (double)sum / x.Length) {
			Console.WriteLine("YES");
		} else {
			Console.WriteLine("NO");
		}
	}
	
	public static void Main(string[] args) {
		Program program = new Program();
		program.Solve();
	}
}
0