結果

問題 No.757 チャンパーノウン定数 (2)
ユーザー %20%20
提出日時 2018-11-29 16:16:32
言語 Ruby
(3.2.2)
結果
AC  
実行時間 124 ms / 2,000 ms
コード長 111 bytes
コンパイル時間 41 ms
コンパイル使用メモリ 11,280 KB
実行使用メモリ 25,100 KB
最終ジャッジ日時 2023-09-09 05:54:54
合計ジャッジ時間 6,715 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
15,740 KB
testcase_01 AC 80 ms
15,656 KB
testcase_02 AC 79 ms
15,816 KB
testcase_03 AC 81 ms
15,752 KB
testcase_04 AC 81 ms
15,916 KB
testcase_05 AC 80 ms
15,760 KB
testcase_06 AC 82 ms
16,192 KB
testcase_07 AC 80 ms
16,100 KB
testcase_08 AC 79 ms
15,984 KB
testcase_09 AC 81 ms
15,928 KB
testcase_10 AC 78 ms
15,648 KB
testcase_11 AC 78 ms
15,728 KB
testcase_12 AC 78 ms
15,684 KB
testcase_13 AC 80 ms
15,900 KB
testcase_14 AC 79 ms
16,076 KB
testcase_15 AC 81 ms
15,840 KB
testcase_16 AC 81 ms
16,160 KB
testcase_17 AC 81 ms
15,916 KB
testcase_18 AC 84 ms
16,004 KB
testcase_19 AC 81 ms
15,872 KB
testcase_20 AC 81 ms
15,916 KB
testcase_21 AC 82 ms
15,924 KB
testcase_22 AC 81 ms
15,740 KB
testcase_23 AC 81 ms
15,824 KB
testcase_24 AC 80 ms
16,004 KB
testcase_25 AC 80 ms
15,976 KB
testcase_26 AC 80 ms
16,004 KB
testcase_27 AC 83 ms
16,000 KB
testcase_28 AC 110 ms
22,228 KB
testcase_29 AC 106 ms
21,836 KB
testcase_30 AC 86 ms
16,504 KB
testcase_31 AC 81 ms
16,688 KB
testcase_32 AC 80 ms
16,116 KB
testcase_33 AC 81 ms
16,380 KB
testcase_34 AC 92 ms
18,944 KB
testcase_35 AC 82 ms
16,640 KB
testcase_36 AC 82 ms
16,324 KB
testcase_37 AC 103 ms
20,912 KB
testcase_38 AC 107 ms
21,404 KB
testcase_39 AC 110 ms
21,996 KB
testcase_40 AC 121 ms
24,508 KB
testcase_41 AC 123 ms
25,100 KB
testcase_42 AC 88 ms
18,264 KB
testcase_43 AC 112 ms
23,748 KB
testcase_44 AC 124 ms
24,340 KB
testcase_45 AC 110 ms
21,764 KB
testcase_46 AC 104 ms
20,392 KB
testcase_47 AC 120 ms
23,324 KB
testcase_48 AC 100 ms
20,084 KB
testcase_49 AC 111 ms
22,028 KB
testcase_50 AC 81 ms
16,036 KB
testcase_51 AC 81 ms
16,080 KB
testcase_52 AC 83 ms
15,976 KB
testcase_53 AC 82 ms
15,648 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

b=gets.to_i
d=gets.to_i b
n=(1..10**5).bsearch{|k|d<=b**k*k-~-b**k/~-b}
d+=~-b**n/~-b-1
puts (d/n).to_s(b)[d%n]
0