結果

問題 No.2865 Base 10 Subsets 2
ユーザー tassei903tassei903
提出日時 2024-08-30 22:25:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 39 ms / 2,000 ms
コード長 565 bytes
コンパイル時間 223 ms
コンパイル使用メモリ 82,568 KB
実行使用メモリ 54,176 KB
最終ジャッジ日時 2024-08-30 22:25:57
合計ジャッジ時間 1,376 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
52,624 KB
testcase_01 AC 37 ms
53,488 KB
testcase_02 AC 36 ms
53,628 KB
testcase_03 AC 36 ms
52,724 KB
testcase_04 AC 38 ms
53,148 KB
testcase_05 AC 36 ms
52,684 KB
testcase_06 AC 35 ms
54,176 KB
testcase_07 AC 36 ms
52,808 KB
testcase_08 AC 37 ms
52,252 KB
testcase_09 AC 36 ms
52,460 KB
testcase_10 AC 39 ms
52,192 KB
testcase_11 AC 35 ms
52,400 KB
testcase_12 AC 35 ms
53,544 KB
testcase_13 AC 36 ms
52,788 KB
testcase_14 AC 35 ms
53,216 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda :sys.stdin.readline()[:-1]
ni = lambda :int(input())
na = lambda :list(map(int,input().split()))
yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES")
no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO")
#######################################################################

m = 64
n, k = na()
k -= 1
a = [n // (10 ** i) % 10 for i in range(64)]

N = 0
#print(a)
z = 1
for i in range(m):
    #print(k % (a[i] + 1) * z)
    N += k % (a[i] + 1) * z
    k //= a[i] + 1
    z *= 10
print(N)
0