結果

問題 No.268 ラッピング(Easy)
ユーザー fal_rndfal_rnd
提出日時 2016-10-29 01:01:57
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 5,000 ms
コード長 381 bytes
コンパイル時間 1,964 ms
コンパイル使用メモリ 71,924 KB
実行使用メモリ 56,468 KB
最終ジャッジ日時 2023-08-15 22:06:23
合計ジャッジ時間 4,478 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,548 KB
testcase_01 AC 122 ms
56,100 KB
testcase_02 AC 121 ms
55,852 KB
testcase_03 AC 122 ms
56,468 KB
testcase_04 AC 122 ms
55,544 KB
testcase_05 AC 122 ms
55,764 KB
testcase_06 AC 121 ms
55,880 KB
testcase_07 AC 122 ms
56,352 KB
testcase_08 AC 122 ms
55,888 KB
testcase_09 AC 122 ms
55,960 KB
testcase_10 AC 122 ms
56,296 KB
testcase_11 AC 122 ms
56,144 KB
testcase_12 AC 123 ms
56,112 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
class A{
	static Scanner s = new Scanner(System.in);
	public static void main(String[] args) {
		int	x = s.nextInt(),
			y = s.nextInt(),
			z = s.nextInt();
		int l[] = {x+y,y+z,z+x};
		Arrays.sort(l);
		int rgb[]	= {s.nextInt(),s.nextInt(),s.nextInt()};
		Arrays.sort(rgb);
		System.out.println(
				 l[0]*rgb[2]*2
				+l[1]*rgb[1]*2
				+l[2]*rgb[0]*2);
	}
}
0