結果

問題 No.2562 数字探しゲーム(緑以下コンver.)
ユーザー くきみかんくきみかん
提出日時 2023-12-02 16:21:44
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 432 bytes
コンパイル時間 299 ms
コンパイル使用メモリ 11,776 KB
実行使用メモリ 9,984 KB
最終ジャッジ日時 2023-12-02 16:21:49
合計ジャッジ時間 4,262 ms
ジャッジサーバーID
(参考情報)
judge10 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
9,984 KB
testcase_01 TLE -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

t = int(input())
for i in range(t):
    m = int(input())
    d = list(map(int, input().split()))
    k = 0
    #少なくとも
    a=""
    for l in range(1,10):
        a+=str(l)*d[l-1]
    a = int(a)
    k = a//m-1
    while True:
        k += 1
        x = k*m
        x_ = str(x)
        for i in range(1, 10):
            if x_.count(str(i)) < d[i-1]:
                break
        else:
            print(x)
            break
0