結果

問題 No.2562 数字探しゲーム(緑以下コンver.)
コンテスト
ユーザー kemuniku
提出日時 2023-12-02 14:55:12
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 138 ms / 2,000 ms
コード長 381 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 298 ms
コンパイル使用メモリ 85,248 KB
実行使用メモリ 83,996 KB
最終ジャッジ日時 2026-05-14 01:39:57
合計ジャッジ時間 2,067 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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