結果
| 問題 | No.268 ラッピング(Easy) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-03-20 14:34:44 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 612 bytes |
| 記録 | |
| コンパイル時間 | 2,567 ms |
| コンパイル使用メモリ | 82,348 KB |
| 実行使用メモリ | 46,480 KB |
| 最終ジャッジ日時 | 2026-05-24 22:35:02 |
| 合計ジャッジ時間 | 4,497 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 WA * 3 |
ソースコード
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);
}
}