結果
問題 | No.476 正しくない平均 |
ユーザー |
![]() |
提出日時 | 2017-01-28 16:25:21 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 383 bytes |
コンパイル時間 | 2,478 ms |
コンパイル使用メモリ | 75,248 KB |
実行使用メモリ | 54,284 KB |
最終ジャッジ日時 | 2024-12-23 21:06:23 |
合計ジャッジ時間 | 6,873 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 WA * 1 |
ソースコード
import java.util.Scanner;public class Main {public static void main(String[] args) {Scanner sc = new Scanner(System.in);int n = sc.nextInt();int answer = sc.nextInt();int sum = 0;for (int i = 0; i < n; i++) {sum += sc.nextInt();}System.out.println(sum == answer * n ? "YES" : "NO");}}