結果
問題 |
No.476 正しくない平均
|
ユーザー |
|
提出日時 | 2021-03-16 22:31:24 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 535 bytes |
コンパイル時間 | 4,716 ms |
コンパイル使用メモリ | 73,404 KB |
実行使用メモリ | 37,152 KB |
最終ジャッジ日時 | 2024-11-08 18:02:58 |
合計ジャッジ時間 | 6,926 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 WA * 1 |
ソースコード
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 * Integer.parseInt(t[1]) == sum ? "YES" : "NO"); } }