結果
問題 |
No.476 正しくない平均
|
ユーザー |
![]() |
提出日時 | 2017-02-20 02:40:25 |
言語 | Java (openjdk 23) |
結果 |
RE
|
実行時間 | - |
コード長 | 520 bytes |
コンパイル時間 | 4,013 ms |
コンパイル使用メモリ | 74,528 KB |
実行使用メモリ | 41,528 KB |
最終ジャッジ日時 | 2024-12-30 05:30:16 |
合計ジャッジ時間 | 9,298 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 3 |
other | RE * 26 |
ソースコード
import java.util.Scanner; public class Test15 { static long kk(long n){ Scanner sc = new Scanner(System.in); long c=0; for(int i=0;i<n;i++){ long s=sc.nextLong(); c+=s; } return c; } public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s=sc.nextLine(); String[] s1=s.split(" "); long a =Long.parseLong(s1[0]); long b =Long.parseLong(s1[1]); long d=kk(a); if(d%a==0 && d/a==b){ System.out.println("YES"); }else{ System.out.println("NO"); } } }