結果
問題 | No.476 正しくない平均 |
ユーザー |
![]() |
提出日時 | 2017-01-27 22:21:13 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 156 ms / 2,000 ms |
コード長 | 625 bytes |
コンパイル時間 | 6,442 ms |
コンパイル使用メモリ | 80,064 KB |
実行使用メモリ | 41,760 KB |
最終ジャッジ日時 | 2024-12-24 09:27:03 |
合計ジャッジ時間 | 9,187 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 26 |
ソースコード
import java.io.BufferedInputStream; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.*; public class _476 { public static void main(String[] args) throws IOException { new _476().solve(); } void solve() throws IOException { try (final Scanner in = new Scanner(System.in)) { int n = in.nextInt(); long a = in.nextLong(); long sum = 0; for (int i = 0; i < n; i++) sum += in.nextLong(); System.out.println(sum == a * n ? "YES" : "NO"); } } // for debug static void dump(Object... o) { System.err.println(Arrays.deepToString(o)); } }