結果

問題 No.2865 Base 10 Subsets 2
コンテスト
ユーザー Sinonen
提出日時 2024-08-30 21:42:53
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 236 bytes
コンパイル時間 301 ms
コンパイル使用メモリ 82,252 KB
実行使用メモリ 66,960 KB
最終ジャッジ日時 2024-08-30 21:42:56
合計ジャッジ時間 2,094 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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(K//cnt)
	K=K%cnt
ans="".join(ans)
print(int(ans))
	
0