結果
問題 |
No.476 正しくない平均
|
ユーザー |
|
提出日時 | 2021-03-16 22:35:12 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 533 bytes |
コンパイル時間 | 4,942 ms |
コンパイル使用メモリ | 73,296 KB |
実行使用メモリ | 37,144 KB |
最終ジャッジ日時 | 2024-11-08 18:09:12 |
合計ジャッジ時間 | 7,424 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 WA * 7 |
ソースコード
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class No00000476_Main { static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); public static void main(String[] args) throws IOException { String[] t = br.readLine().split(" "); int n = Integer.parseInt(t[0]); String[] x = br.readLine().split(" "); int sum = 0; for(int i = 0; i < n; i++) sum += Integer.parseInt(x[i]); System.out.println(n * Long.parseLong(t[1]) == sum ? "YES" : "NO"); } }