結果

問題 No.3 ビットすごろく
ユーザー mmmpppmmmppp
提出日時 2017-02-27 23:43:56
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 108 bytes
コンパイル時間 62 ms
コンパイル使用メモリ 11,328 KB
実行使用メモリ 15,752 KB
最終ジャッジ日時 2023-09-02 13:35:10
合計ジャッジ時間 30,507 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
15,100 KB
testcase_01 AC 77 ms
15,072 KB
testcase_02 AC 78 ms
15,012 KB
testcase_03 AC 470 ms
15,040 KB
testcase_04 AC 115 ms
15,172 KB
testcase_05 AC 2,026 ms
15,616 KB
testcase_06 AC 564 ms
15,320 KB
testcase_07 AC 237 ms
15,200 KB
testcase_08 AC 1,313 ms
15,508 KB
testcase_09 AC 3,422 ms
15,752 KB
testcase_10 AC 4,889 ms
15,504 KB
testcase_11 AC 2,843 ms
15,688 KB
testcase_12 AC 1,920 ms
15,656 KB
testcase_13 AC 358 ms
15,228 KB
testcase_14 AC 4,536 ms
15,524 KB
testcase_15 TLE -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n=gets.to_i
r=0,1
n.times{|i|n.times{|j|r[j]==i&&(r[j+x=('%b'%j).count(?1)]||=i+1
r[j-x]||=i+1)}}
p r[n]||~0
0