結果

問題 No.1651 Removing Cards
ユーザー 👑 hos.lyrichos.lyric
提出日時 2021-07-25 14:10:53
言語 Ruby
(3.3.0)
結果
AC  
実行時間 928 ms / 2,000 ms
コード長 121 bytes
コンパイル時間 104 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 18,816 KB
最終ジャッジ日時 2024-04-22 03:27:22
合計ジャッジ時間 21,397 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
12,288 KB
testcase_01 AC 80 ms
12,416 KB
testcase_02 AC 89 ms
12,928 KB
testcase_03 AC 76 ms
12,288 KB
testcase_04 AC 78 ms
12,416 KB
testcase_05 AC 77 ms
12,288 KB
testcase_06 AC 76 ms
12,160 KB
testcase_07 AC 77 ms
12,160 KB
testcase_08 AC 75 ms
12,416 KB
testcase_09 AC 519 ms
15,360 KB
testcase_10 AC 529 ms
15,488 KB
testcase_11 AC 553 ms
15,616 KB
testcase_12 AC 568 ms
15,360 KB
testcase_13 AC 580 ms
15,488 KB
testcase_14 AC 559 ms
15,488 KB
testcase_15 AC 839 ms
18,816 KB
testcase_16 AC 813 ms
18,816 KB
testcase_17 AC 811 ms
18,816 KB
testcase_18 AC 827 ms
18,688 KB
testcase_19 AC 822 ms
18,688 KB
testcase_20 AC 809 ms
18,432 KB
testcase_21 AC 782 ms
18,816 KB
testcase_22 AC 783 ms
17,920 KB
testcase_23 AC 538 ms
14,720 KB
testcase_24 AC 518 ms
14,848 KB
testcase_25 AC 746 ms
18,176 KB
testcase_26 AC 714 ms
18,048 KB
testcase_27 AC 928 ms
18,176 KB
testcase_28 AC 778 ms
18,176 KB
testcase_29 AC 779 ms
18,304 KB
testcase_30 AC 765 ms
18,176 KB
testcase_31 AC 788 ms
18,432 KB
testcase_32 AC 509 ms
15,104 KB
testcase_33 AC 535 ms
15,232 KB
testcase_34 AC 535 ms
15,104 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

k=gets.split[0].to_i
xs=[x=0]
while x<2e18 do xs.push x+=x/(k-1)+1 end
xs.reverse!
$<.map{|n|p xs.bsearch{|y|y<n.to_i}+1}
0