結果

問題 No.757 チャンパーノウン定数 (2)
ユーザー 👑 kmjpkmjp
提出日時 2018-12-04 23:23:37
言語 PyPy2
(7.3.13)
結果
TLE  
実行時間 -
コード長 313 bytes
コンパイル時間 1,386 ms
コンパイル使用メモリ 77,644 KB
実行使用メモリ 86,944 KB
最終ジャッジ日時 2023-09-22 20:08:25
合計ジャッジ時間 7,607 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
81,860 KB
testcase_01 AC 73 ms
76,180 KB
testcase_02 AC 73 ms
76,544 KB
testcase_03 AC 72 ms
76,172 KB
testcase_04 AC 76 ms
77,312 KB
testcase_05 AC 77 ms
77,408 KB
testcase_06 AC 78 ms
77,656 KB
testcase_07 AC 73 ms
76,404 KB
testcase_08 AC 78 ms
77,556 KB
testcase_09 AC 77 ms
77,656 KB
testcase_10 AC 73 ms
76,584 KB
testcase_11 AC 73 ms
76,268 KB
testcase_12 AC 74 ms
76,316 KB
testcase_13 AC 76 ms
77,404 KB
testcase_14 AC 77 ms
77,612 KB
testcase_15 AC 79 ms
77,304 KB
testcase_16 AC 74 ms
76,576 KB
testcase_17 AC 78 ms
77,608 KB
testcase_18 AC 78 ms
77,548 KB
testcase_19 AC 72 ms
76,120 KB
testcase_20 AC 77 ms
77,484 KB
testcase_21 AC 73 ms
76,316 KB
testcase_22 AC 78 ms
77,480 KB
testcase_23 AC 79 ms
77,572 KB
testcase_24 AC 78 ms
77,316 KB
testcase_25 AC 73 ms
76,184 KB
testcase_26 AC 80 ms
77,700 KB
testcase_27 AC 80 ms
77,220 KB
testcase_28 TLE -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
testcase_45 -- -
testcase_46 -- -
testcase_47 -- -
testcase_48 -- -
testcase_49 -- -
testcase_50 -- -
testcase_51 -- -
testcase_52 -- -
testcase_53 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #


def Sn(n):
	bn = B**n
	return n*bn - (bn-1)/(B-1)

B=int(raw_input())
C=raw_input().strip()
D=0
for c in C:
	D=D*B+(ord(c)-ord('0'))

D-=1
L=0
for i in range(16,-1,-1):
	if Sn(L+(1<<i))<=D:
		L += 1<<i


D -= Sn(L)
L += 1

mo = D % L
D = (B**(L-1)) + D/L

S=""
while D>0:
	S += str(D%B)
	D /= B

print S[-1-mo]
0