結果

問題 No.375 立方体のN等分 (1)
ユーザー cielciel
提出日時 2016-06-05 04:14:16
言語 Ruby
(3.3.0)
結果
AC  
実行時間 498 ms / 5,000 ms
コード長 116 bytes
コンパイル時間 52 ms
コンパイル使用メモリ 11,300 KB
実行使用メモリ 15,600 KB
最終ジャッジ日時 2023-08-27 01:39:06
合計ジャッジ時間 6,054 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
15,596 KB
testcase_01 AC 74 ms
15,364 KB
testcase_02 AC 122 ms
15,436 KB
testcase_03 AC 71 ms
15,460 KB
testcase_04 AC 73 ms
15,392 KB
testcase_05 AC 73 ms
15,440 KB
testcase_06 AC 81 ms
15,460 KB
testcase_07 AC 86 ms
15,412 KB
testcase_08 AC 111 ms
15,468 KB
testcase_09 AC 96 ms
15,552 KB
testcase_10 AC 110 ms
15,512 KB
testcase_11 AC 108 ms
15,520 KB
testcase_12 AC 114 ms
15,536 KB
testcase_13 AC 116 ms
15,536 KB
testcase_14 AC 167 ms
15,468 KB
testcase_15 AC 119 ms
15,528 KB
testcase_16 AC 120 ms
15,416 KB
testcase_17 AC 329 ms
15,600 KB
testcase_18 AC 173 ms
15,424 KB
testcase_19 AC 127 ms
15,460 KB
testcase_20 AC 131 ms
15,480 KB
testcase_21 AC 124 ms
15,572 KB
testcase_22 AC 498 ms
15,500 KB
testcase_23 AC 129 ms
15,432 KB
testcase_24 AC 130 ms
15,468 KB
testcase_25 AC 132 ms
15,424 KB
testcase_26 AC 127 ms
15,460 KB
testcase_27 AC 126 ms
15,344 KB
testcase_28 AC 130 ms
15,416 KB
testcase_29 AC 135 ms
15,568 KB
testcase_30 AC 128 ms
15,468 KB
testcase_31 AC 133 ms
15,468 KB
testcase_32 AC 132 ms
15,520 KB
testcase_33 AC 132 ms
15,368 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

m=N=gets.to_i
y=(1..N**0.5).select{|i|N%i==0}
y.map{|a|y.each{|b|N%(a*b)==0&&m=[m,a+b+N/a/b-3].min}}
$><<[m,N-1]*' '
0