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