結果

問題 No.2562 数字探しゲーム(緑以下コンver.)
ユーザー kemunikukemuniku
提出日時 2023-12-02 14:55:12
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 190 ms / 2,000 ms
コード長 381 bytes
コンパイル時間 170 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 78,336 KB
最終ジャッジ日時 2023-12-02 14:55:14
合計ジャッジ時間 2,027 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
53,460 KB
testcase_01 AC 33 ms
53,460 KB
testcase_02 AC 36 ms
53,460 KB
testcase_03 AC 35 ms
53,460 KB
testcase_04 AC 137 ms
76,384 KB
testcase_05 AC 190 ms
78,336 KB
testcase_06 AC 132 ms
76,276 KB
testcase_07 AC 159 ms
76,392 KB
testcase_08 AC 134 ms
76,532 KB
testcase_09 AC 179 ms
77,960 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())
for _ in range(T):
    M = int(input())
    d = [0]+list(map(int,input().split()))
    tmp = []
    for i in range(1,10):
        for j in range(d[i]):
            tmp.append(str(i))
    if tmp == []:
        x = M
    else:
        x = int("".join(tmp))*(10**9)
    if M != 10**9:
        x += M-x%M
    assert x % M == 0
    assert 1 <= x <= 10**18
    print(x)
0