結果

問題 No.476 正しくない平均
ユーザー dksnkzk
提出日時 2017-02-18 01:52:19
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 365 bytes
コンパイル時間 3,983 ms
コンパイル使用メモリ 74,960 KB
実行使用メモリ 55,904 KB
最終ジャッジ日時 2024-12-30 03:11:52
合計ジャッジ時間 9,644 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Ex1
{
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		int index = scan.nextInt();
		int ave = scan.nextInt();
		int i = index;
		int sum=0;
		while(i-- != 0){
			sum += scan.nextInt();
		}
		
		if(sum == ave*index)
			System.out.println("yes");
		else 
			System.out.println("no");
	}
}
0