結果
| 問題 |
No.476 正しくない平均
|
| ユーザー |
|
| 提出日時 | 2019-02-13 16:50:16 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 310 bytes |
| コンパイル時間 | 2,364 ms |
| コンパイル使用メモリ | 75,268 KB |
| 実行使用メモリ | 54,368 KB |
| 最終ジャッジ日時 | 2024-09-13 10:24:25 |
| 合計ジャッジ時間 | 7,311 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 19 WA * 7 |
ソースコード
import java.util.*;
class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
int n = sc.nextInt(); long favg = sc.nextLong();
Long sum = 0L;
for (int i=0; i<n; i++) {
sum += sc.nextInt() * n;
}
System.out.println(sum/n==favg*n?"YES":"NO");
}
}