結果

問題 No.376 立方体のN等分 (2)
ユーザー cielciel
提出日時 2020-08-14 01:11:20
言語 Crystal
(1.11.2)
結果
AC  
実行時間 1,407 ms / 5,000 ms
コード長 204 bytes
コンパイル時間 17,863 ms
コンパイル使用メモリ 254,980 KB
実行使用メモリ 5,112 KB
最終ジャッジ日時 2023-09-13 11:36:38
合計ジャッジ時間 28,905 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,460 KB
testcase_01 AC 3 ms
4,380 KB
testcase_02 AC 103 ms
4,384 KB
testcase_03 AC 101 ms
4,864 KB
testcase_04 AC 118 ms
4,380 KB
testcase_05 AC 2 ms
4,416 KB
testcase_06 AC 3 ms
4,380 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 AC 8 ms
4,396 KB
testcase_09 AC 28 ms
4,380 KB
testcase_10 AC 112 ms
4,824 KB
testcase_11 AC 55 ms
4,376 KB
testcase_12 AC 73 ms
4,584 KB
testcase_13 AC 75 ms
4,376 KB
testcase_14 AC 84 ms
4,440 KB
testcase_15 AC 93 ms
4,384 KB
testcase_16 AC 1,227 ms
5,080 KB
testcase_17 AC 104 ms
4,464 KB
testcase_18 AC 106 ms
4,376 KB
testcase_19 AC 110 ms
4,716 KB
testcase_20 AC 112 ms
4,420 KB
testcase_21 AC 1,249 ms
5,112 KB
testcase_22 AC 118 ms
4,376 KB
testcase_23 AC 1,289 ms
4,972 KB
testcase_24 AC 1,212 ms
5,048 KB
testcase_25 AC 121 ms
4,504 KB
testcase_26 AC 1,407 ms
4,932 KB
testcase_27 AC 122 ms
4,380 KB
testcase_28 AC 123 ms
4,376 KB
testcase_29 AC 123 ms
4,376 KB
testcase_30 AC 123 ms
4,452 KB
testcase_31 AC 123 ms
4,376 KB
testcase_32 AC 122 ms
4,396 KB
testcase_33 AC 123 ms
4,376 KB
testcase_34 AC 123 ms
4,428 KB
testcase_35 AC 123 ms
4,380 KB
testcase_36 AC 123 ms
4,380 KB
testcase_37 AC 123 ms
4,380 KB
testcase_38 AC 124 ms
4,380 KB
testcase_39 AC 123 ms
4,452 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

lib C;fun strtoll(s: UInt8*,p: UInt8*,b: Int32) : Int64;end
m=n=C.strtoll(gets.not_nil!,nil,10)
y=(1_i64..n**0.5).reject{|i|n%i>0}
y.map{|a|y.each{|b|c=a*b;n%c==0&&(m=[m,a+b+n//c-3].min)}}
print m," ",n-1
0