結果
| 問題 | No.1134 Deviation Score Ⅱ |
| ユーザー |
|
| 提出日時 | 2020-08-04 21:45:01 |
| 言語 | Java (openjdk 27 + ACL) |
| 結果 |
WA
不安定
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 790 bytes |
| 記録 | |
| コンパイル時間 | 2,062 ms |
| コンパイル使用メモリ | 91,532 KB |
| 実行使用メモリ | 54,624 KB |
| 最終ジャッジ日時 | 2026-10-16 21:58:50 |
| 合計ジャッジ時間 | 6,756 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 28 WA * 1 |
ソースコード
import java.io.*;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
String[] line = br.readLine().split(" ");
int x[] = new int[n];
double sum = 0;
for(int i = 0; i < n; i++){
x[i] = Integer.parseInt(line[i]);
sum += x[i];
}
sum /= n;
double d = 0;
for(int i = 0; i < n; i++){
d += Math.pow(sum-x[i], 2.0);
}
d = Math.sqrt(d/n);
int m = Integer.parseInt(br.readLine())-1;
int ret = 50;
if(d > 0){
ret += (x[m]-sum)*10/d;
}
System.out.println(ret);
}
}