結果
| 問題 |
No.476 正しくない平均
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-02-18 01:36:28 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 408 bytes |
| コンパイル時間 | 3,606 ms |
| コンパイル使用メモリ | 74,384 KB |
| 実行使用メモリ | 56,304 KB |
| 最終ジャッジ日時 | 2024-12-30 03:09:43 |
| 合計ジャッジ時間 | 9,432 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 26 |
ソースコード
import java.util.Scanner;
public class Ex1
{
public static void main(String[] args)
{
Scanner scan = new Scanner(System.in);
int index = scan.nextInt();
int ave = scan.nextInt();
int i = index;
int sum=0;
while(i-- != 0){
sum += scan.nextInt();
}
double average = sum/(double)index;
if(average == (double)ave)
System.out.println("yes");
else
System.out.println("no");
}
}