結果

問題 No.268 ラッピング(Easy)
ユーザー tsunabittsunabit
提出日時 2020-03-20 14:34:44
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 612 bytes
コンパイル時間 3,479 ms
コンパイル使用メモリ 71,748 KB
実行使用メモリ 57,956 KB
最終ジャッジ日時 2023-08-20 21:41:22
合計ジャッジ時間 6,139 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
55,652 KB
testcase_01 AC 124 ms
55,876 KB
testcase_02 AC 123 ms
56,072 KB
testcase_03 AC 123 ms
55,860 KB
testcase_04 AC 124 ms
55,820 KB
testcase_05 AC 123 ms
55,980 KB
testcase_06 AC 125 ms
53,752 KB
testcase_07 AC 126 ms
56,012 KB
testcase_08 WA -
testcase_09 AC 120 ms
55,900 KB
testcase_10 WA -
testcase_11 AC 126 ms
55,472 KB
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;
import java.math.*;

public class No268 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] l = {sc.nextInt(), sc.nextInt(), sc.nextInt()};
//		int l1 = sc.nextInt(), l2 = sc.nextInt(), l3 = sc.nextInt();
		int r = sc.nextInt(), b = sc.nextInt(), y = sc.nextInt();
		int ans = Integer.MAX_VALUE;
		for(int i = 0; i < 3; i++) {
			int t = 0;
			t +=(l[0]+l[2])*2*r + (l[1]+l[2])*2*b + (l[1]+l[0])*2*y;
			ans = Math.min(ans, t);
			
			int k;
			k = l[0];
			l[0] = l[1];
			l[1] = l[2];
			l[2] = k;
		}
		System.out.println(ans);
	}
}
0