結果

問題 No.268 ラッピング(Easy)
ユーザー tsunabit
提出日時 2020-03-20 14:34:44
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 612 bytes
コンパイル時間 3,437 ms
コンパイル使用メモリ 75,152 KB
実行使用メモリ 54,356 KB
最終ジャッジ日時 2024-12-14 04:12:14
合計ジャッジ時間 6,022 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7 WA * 3
権限があれば一括ダウンロードができます

ソースコード

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