結果

問題 No.757 チャンパーノウン定数 (2)
ユーザー nasadigital
提出日時 2018-12-06 11:25:12
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 266 bytes
コンパイル時間 89 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,136 KB
最終ジャッジ日時 2024-09-14 02:21:56
合計ジャッジ時間 3,292 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 1 RE * 2
other AC * 11 WA * 17 RE * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

b = int(input()) 
n = int(input())
digit = 0
total = 0
while True:
    total = (total + 1) * b - 1
    digit += 1
    if n <= total * digit:
        break
    n -= total * digit
num = b ** (digit - 1) + ((n + digit - 1) // digit) - 1
print(str(num)[(n - 1) % digit])
0