結果

問題 No.268 ラッピング(Easy)
ユーザー ぴろず
提出日時 2015-08-21 22:40:43
言語 Java
(openjdk 23)
結果
AC  
実行時間 117 ms / 5,000 ms
コード長 462 bytes
コンパイル時間 1,748 ms
コンパイル使用メモリ 74,124 KB
実行使用メモリ 41,544 KB
最終ジャッジ日時 2024-07-18 11:46:23
合計ジャッジ時間 3,748 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

package no268;

import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] l = new int[3];
		for(int i=0;i<3;i++) {
			l[i] = sc.nextInt();
		}
		Arrays.sort(l);
		int[] a = new int[3];
		for(int i=0;i<3;i++) {
			a[i] = sc.nextInt();
		}
		Arrays.sort(a);
		System.out.println(2 * ((l[1] + l[2]) * a[0] + (l[0] + l[2]) * a[1] + (l[0] + l[1]) * a[2]));
	}

}
0