結果
| 問題 | No.394 ハーフパイプ(1) |
| コンテスト | |
| ユーザー |
Force_Access
|
| 提出日時 | 2016-07-20 11:33:29 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 737 bytes |
| コンパイル時間 | 3,866 ms |
| コンパイル使用メモリ | 75,068 KB |
| 実行使用メモリ | 41,176 KB |
| 最終ジャッジ日時 | 2024-10-15 17:31:45 |
| 合計ジャッジ時間 | 5,704 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 WA * 5 |
ソースコード
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);
int 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