結果
| 問題 | No.394 ハーフパイプ(1) |
| コンテスト | |
| ユーザー |
Force_Access
|
| 提出日時 | 2016-07-20 11:34:39 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 134 ms / 2,000 ms |
| コード長 | 739 bytes |
| コンパイル時間 | 3,558 ms |
| コンパイル使用メモリ | 75,144 KB |
| 実行使用メモリ | 41,356 KB |
| 最終ジャッジ日時 | 2024-10-15 17:31:51 |
| 合計ジャッジ時間 | 5,745 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 |
ソースコード
import java.util.Scanner;
import java.text.DecimalFormat;
public class Study01 {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String a = sc.nextLine();
String [] b = a.split(" ");
int [] c = new int[6];
int max = 0,min = 10000;
for(int i=0;i<b.length;i++){
c[i] = Integer.parseInt(b[i]);
//System.out.println(c[i]);
max = Math.max(max,c[i]);
min = Math.min(min,c[i]);
}
DecimalFormat format = new DecimalFormat("#.#");
format.setMinimumFractionDigits(2);
format.setMaximumFractionDigits(2);
double answer = 0;
for(int i=0;i<6;i++){
answer += c[i];
}
int hiki = max + min;
answer = answer - hiki;
answer /= 4;
System.out.println(format.format(answer));
}
}
Force_Access