結果

問題 No.268 ラッピング(Easy)
ユーザー kohaku_kohaku
提出日時 2016-11-18 21:38:07
言語 Java
(openjdk 23)
結果
AC  
実行時間 116 ms / 5,000 ms
コード長 560 bytes
コンパイル時間 1,806 ms
コンパイル使用メモリ 79,280 KB
実行使用メモリ 41,448 KB
最終ジャッジ日時 2024-11-26 06:12:17
合計ジャッジ時間 4,062 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

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