結果

問題 No.476 正しくない平均
ユーザー bob___w
提出日時 2017-02-20 00:26:29
言語 Java
(openjdk 23)
結果
RE  
実行時間 -
コード長 521 bytes
コンパイル時間 4,125 ms
コンパイル使用メモリ 76,056 KB
実行使用メモリ 54,656 KB
最終ジャッジ日時 2024-12-30 05:28:15
合計ジャッジ時間 9,692 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 3
other RE * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class Test15 {
static int d=0;
	static int kk(int n){
		Scanner sc = new Scanner(System.in);
		int c=0;
		for(int i=0;i<n;i++){
			int s=sc.nextInt();
			c+=s;
		}
		return d=c;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s=sc.nextLine();

		String[] s1=s.split(" ");

		int a =Integer.parseInt(s1[0]);
		int b =Integer.parseInt(s1[1]);

		kk(a);

		if(d/a==b){
			System.out.println("YES");
		}else{
			System.out.println("NO");
		}
	}
}
0