結果

問題 No.268 ラッピング(Easy)
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-18 21:38:07
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 5,000 ms
コード長 560 bytes
コンパイル時間 2,507 ms
コンパイル使用メモリ 71,572 KB
実行使用メモリ 56,080 KB
最終ジャッジ日時 2023-08-17 10:14:38
合計ジャッジ時間 4,666 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
54,076 KB
testcase_01 AC 126 ms
55,864 KB
testcase_02 AC 127 ms
55,840 KB
testcase_03 AC 128 ms
56,080 KB
testcase_04 AC 128 ms
55,768 KB
testcase_05 AC 124 ms
55,792 KB
testcase_06 AC 126 ms
55,992 KB
testcase_07 AC 124 ms
55,844 KB
testcase_08 AC 123 ms
55,496 KB
testcase_09 AC 125 ms
55,496 KB
testcase_10 AC 126 ms
55,944 KB
testcase_11 AC 127 ms
55,972 KB
testcase_12 AC 126 ms
55,804 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int L1 = sc.nextInt();
        int L2 = sc.nextInt();
        int L3 = sc.nextInt();
        int [] L = {L1+L2,L2+L3,L3+L1};
        int [] RBY = new int [3];
        for(int i=0; i<3; i++){
            RBY[i] = sc.nextInt();
        }
        Arrays.sort(L);
        Arrays.sort(RBY);
        int min=0;
        for(int i=0; i<3; i++){
            min+=RBY[i]*L[2-i];
        }
        System.out.println(2*min);
    }
}
0