結果

問題 No.2865 Base 10 Subsets 2
コンテスト
ユーザー Sinonen
提出日時 2024-08-30 21:43:44
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 241 bytes
コンパイル時間 325 ms
コンパイル使用メモリ 82,200 KB
実行使用メモリ 66,892 KB
最終ジャッジ日時 2024-08-30 21:43:46
合計ジャッジ時間 1,931 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 3
other RE * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K=list(map(int,input.split()))
N=str(N)
M=[]
ans=[]
for i in range(len(N)):
	M.append(int(N[i])+1)
for i in range(len(N)):
	cnt=1
	for j in range(i+1,len(N)):
		cnt*=M[j]
	ans.append(str(K//cnt))
	K=K%cnt
ans="".join(ans)
print(int(ans))
	
0