結果

問題 No.756 チャンパーノウン定数 (1)
ユーザー cielciel
提出日時 2018-12-06 12:10:06
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 79 ms / 2,000 ms
コード長 380 bytes
コンパイル時間 297 ms
コンパイル使用メモリ 87,284 KB
実行使用メモリ 71,604 KB
最終ジャッジ日時 2023-10-12 02:38:05
合計ジャッジ時間 3,089 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,352 KB
testcase_01 AC 77 ms
71,476 KB
testcase_02 AC 79 ms
71,352 KB
testcase_03 AC 78 ms
71,152 KB
testcase_04 AC 76 ms
71,360 KB
testcase_05 AC 78 ms
71,604 KB
testcase_06 AC 72 ms
71,448 KB
testcase_07 AC 67 ms
71,412 KB
testcase_08 AC 67 ms
71,148 KB
testcase_09 AC 66 ms
71,452 KB
testcase_10 AC 68 ms
71,468 KB
testcase_11 AC 67 ms
71,588 KB
testcase_12 AC 68 ms
71,432 KB
testcase_13 AC 68 ms
71,168 KB
testcase_14 AC 67 ms
71,168 KB
testcase_15 AC 67 ms
71,440 KB
testcase_16 AC 66 ms
71,436 KB
testcase_17 AC 76 ms
71,332 KB
testcase_18 AC 76 ms
71,476 KB
testcase_19 AC 75 ms
71,472 KB
testcase_20 AC 76 ms
71,392 KB
testcase_21 AC 76 ms
71,448 KB
testcase_22 AC 75 ms
71,492 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