結果
問題 |
No.476 正しくない平均
|
ユーザー |
![]() |
提出日時 | 2017-10-03 10:02:07 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 345 bytes |
コンパイル時間 | 6,032 ms |
コンパイル使用メモリ | 74,124 KB |
実行使用メモリ | 54,336 KB |
最終ジャッジ日時 | 2024-11-16 05:32:40 |
合計ジャッジ時間 | 7,511 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 WA * 7 |
ソースコード
import java.util.Scanner; public class Main{ private static Scanner sc=new Scanner(System.in); public static void main(String args[])throws Exception{ int n=sc.nextInt(),a=sc.nextInt(),sum=0; for(int i=0;i<n;i++){ sum+=sc.nextInt(); }double abe=sum*1.0/n; if(abe == a)System.out.println("YES"); else System.out.println("NO"); } }