結果

問題 No.756 チャンパーノウン定数 (1)
ユーザー cielciel
提出日時 2018-12-06 12:10:00
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 77 ms / 2,000 ms
コード長 380 bytes
コンパイル時間 875 ms
コンパイル使用メモリ 77,948 KB
実行使用メモリ 76,648 KB
最終ジャッジ日時 2023-10-12 02:37:56
合計ジャッジ時間 3,944 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
76,276 KB
testcase_01 AC 75 ms
76,436 KB
testcase_02 AC 77 ms
76,584 KB
testcase_03 AC 73 ms
76,068 KB
testcase_04 AC 76 ms
76,576 KB
testcase_05 AC 75 ms
76,216 KB
testcase_06 AC 75 ms
76,536 KB
testcase_07 AC 74 ms
76,272 KB
testcase_08 AC 75 ms
76,232 KB
testcase_09 AC 73 ms
76,448 KB
testcase_10 AC 74 ms
76,352 KB
testcase_11 AC 75 ms
76,480 KB
testcase_12 AC 74 ms
76,232 KB
testcase_13 AC 74 ms
76,084 KB
testcase_14 AC 76 ms
76,356 KB
testcase_15 AC 74 ms
76,392 KB
testcase_16 AC 73 ms
76,408 KB
testcase_17 AC 73 ms
76,516 KB
testcase_18 AC 73 ms
76,308 KB
testcase_19 AC 75 ms
76,068 KB
testcase_20 AC 74 ms
76,392 KB
testcase_21 AC 73 ms
76,648 KB
testcase_22 AC 74 ms
76,540 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/python
import sys
if sys.version_info[0]>=3: raw_input=input

starting=1
bse=10
try:
	while True:
		n=int(raw_input())
		n+=starting-2
		digits=1
		expbase=1
		while True:
			x=digits*expbase*(bse-1)
			if x>n:break
			n-=x
			digits+=1
			expbase*=bse
		num=expbase+n//digits
		d=digits-1-n%digits
		for _ in range(d): num//=bse
		print(num%bse)
except EOFError:
	pass
0