結果

問題 No.268 ラッピング(Easy)
ユーザー Mcpu3Mcpu3
提出日時 2018-09-05 14:06:54
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 5,000 ms
コード長 434 bytes
コンパイル時間 2,027 ms
コンパイル使用メモリ 74,516 KB
実行使用メモリ 41,888 KB
最終ジャッジ日時 2024-04-26 07:33:51
合計ジャッジ時間 4,398 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
41,204 KB
testcase_01 AC 126 ms
41,160 KB
testcase_02 AC 117 ms
40,952 KB
testcase_03 AC 120 ms
41,272 KB
testcase_04 AC 114 ms
39,940 KB
testcase_05 AC 111 ms
40,192 KB
testcase_06 AC 123 ms
41,268 KB
testcase_07 AC 111 ms
41,888 KB
testcase_08 AC 114 ms
41,640 KB
testcase_09 AC 123 ms
41,380 KB
testcase_10 AC 115 ms
40,420 KB
testcase_11 AC 124 ms
41,472 KB
testcase_12 AC 121 ms
41,360 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

class Main{
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int l[]=new int[3],n[]=new int[3],s;
		for(int i=0;i<3;++i) l[i]=sc.nextInt();
		Arrays.sort(l);
		for(int i=0;i<3;++i) n[i]=sc.nextInt();
		Arrays.sort(n);
		sc.close();
		s=(l[0]+l[1])*2*n[2];
		s+=(l[0]+l[2])*2*n[1];
		s+=(l[1]+l[2])*2*n[0];
		System.out.print(s);
	}
}
0