結果

問題 No.268 ラッピング(Easy)
ユーザー eigh8_teigh8_t
提出日時 2015-08-21 22:59:14
言語 Ruby
(3.3.0)
結果
AC  
実行時間 82 ms / 5,000 ms
コード長 197 bytes
コンパイル時間 239 ms
コンパイル使用メモリ 11,336 KB
実行使用メモリ 15,296 KB
最終ジャッジ日時 2023-09-25 15:08:49
合計ジャッジ時間 2,243 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
15,056 KB
testcase_01 AC 80 ms
15,176 KB
testcase_02 AC 79 ms
15,136 KB
testcase_03 AC 79 ms
15,136 KB
testcase_04 AC 80 ms
15,116 KB
testcase_05 AC 80 ms
15,180 KB
testcase_06 AC 82 ms
15,072 KB
testcase_07 AC 80 ms
15,064 KB
testcase_08 AC 81 ms
15,296 KB
testcase_09 AC 79 ms
15,256 KB
testcase_10 AC 79 ms
15,104 KB
testcase_11 AC 80 ms
15,028 KB
testcase_12 AC 79 ms
15,052 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

a = gets.split.map &:to_i
b = gets.split.map &:to_i

count = 0
sum = []
a.permutation(3){|t|
	sum[count] = 0
	3.times{|i|
		sum[count] += (t[i-2] + t[i-1]) * b[i] * 2
	}
	count += 1
}

puts sum.min
0