結果
| 問題 | No.476 正しくない平均 |
| コンテスト | |
| ユーザー |
yui
|
| 提出日時 | 2017-02-20 10:27:31 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 439 bytes |
| 記録 | |
| コンパイル時間 | 2,212 ms |
| コンパイル使用メモリ | 81,600 KB |
| 実行使用メモリ | 42,724 KB |
| 最終ジャッジ日時 | 2026-06-03 21:59:53 |
| 合計ジャッジ時間 | 6,137 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 17 WA * 9 |
ソースコード
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int num = sc.nextInt();
int av = sc.nextInt();
int ar[] = new int[num];
int ans = 0;
for(int i=0;i<num;i++){
ans += sc.nextInt();
}
int ret = ans/num;
if(ret==av){
System.out.println("YES");
}else{
System.out.println("NO");
}
}
}
yui