結果

問題 No.757 チャンパーノウン定数 (2)
ユーザー 👑 kmjpkmjp
提出日時 2018-12-04 23:18:44
言語 PyPy2
(7.3.13)
結果
TLE  
実行時間 -
コード長 318 bytes
コンパイル時間 2,274 ms
コンパイル使用メモリ 77,744 KB
実行使用メモリ 83,996 KB
最終ジャッジ日時 2023-09-22 19:57:39
合計ジャッジ時間 10,686 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 215 ms
80,264 KB
testcase_01 AC 74 ms
76,140 KB
testcase_02 AC 152 ms
79,120 KB
testcase_03 AC 78 ms
78,748 KB
testcase_04 AC 211 ms
80,568 KB
testcase_05 AC 215 ms
81,188 KB
testcase_06 AC 266 ms
82,644 KB
testcase_07 AC 79 ms
79,488 KB
testcase_08 AC 300 ms
83,996 KB
testcase_09 AC 293 ms
83,956 KB
testcase_10 AC 74 ms
76,340 KB
testcase_11 AC 151 ms
79,484 KB
testcase_12 AC 79 ms
79,012 KB
testcase_13 AC 210 ms
80,352 KB
testcase_14 AC 213 ms
81,060 KB
testcase_15 AC 265 ms
82,652 KB
testcase_16 AC 79 ms
79,508 KB
testcase_17 AC 299 ms
83,672 KB
testcase_18 AC 294 ms
83,980 KB
testcase_19 AC 73 ms
76,148 KB
testcase_20 AC 150 ms
79,500 KB
testcase_21 AC 79 ms
78,684 KB
testcase_22 AC 213 ms
80,640 KB
testcase_23 AC 215 ms
80,888 KB
testcase_24 AC 265 ms
82,880 KB
testcase_25 AC 81 ms
80,076 KB
testcase_26 AC 300 ms
83,612 KB
testcase_27 AC 291 ms
83,576 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,b):
	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(20,-1,-1):
	if Sn(L+(1<<i),B)<=D:
		L += 1<<i

D -= Sn(L,B)
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