結果
問題 | No.394 ハーフパイプ(1) |
ユーザー |
|
提出日時 | 2016-09-15 14:51:18 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 126 ms / 2,000 ms |
コード長 | 458 bytes |
コンパイル時間 | 4,012 ms |
コンパイル使用メモリ | 76,528 KB |
実行使用メモリ | 41,384 KB |
最終ジャッジ日時 | 2024-11-17 06:04:41 |
合計ジャッジ時間 | 5,320 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 |
ソースコード
import java.io.*; import java.util.*; public class Helloworld { public static void main(String[] args){ Scanner sc = new Scanner(System.in); ArrayList<Integer> hoge = new ArrayList<>(6); int i; float x = 0; for(i=0;i<6;++i){ hoge.add(sc.nextInt()); } hoge.remove(hoge.indexOf(Collections.max(hoge))); hoge.remove(hoge.indexOf(Collections.min(hoge))); for(int z: hoge){ x += z; } System.out.printf("%.2f",x / 4); } }