結果
| 問題 | No.476 正しくない平均 |
| コンテスト | |
| ユーザー |
cande398
|
| 提出日時 | 2017-10-08 14:58:59 |
| 言語 | Java (openjdk 26.0.2.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 65 ms / 2,000 ms |
| + 151µs | |
| コード長 | 359 bytes |
| 記録 | |
| コンパイル時間 | 3,547 ms |
| コンパイル使用メモリ | 85,432 KB |
| 実行使用メモリ | 45,936 KB |
| 最終ジャッジ日時 | 2026-09-25 05:29:03 |
| 合計ジャッジ時間 | 7,046 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 |
ソースコード
import java.util.*;
public class Main{
public static void main(String[] args){
double sum = 0;
Scanner sc = new Scanner(System.in);
int num = sc.nextInt();
double ans = sc.nextDouble();
for(int i=0;i<num;i++){
sum += sc.nextDouble();
}
if(sum/num == ans)System.out.println("YES");
else System.out.println("NO");
}
}
cande398