結果

問題 No.2562 数字探しゲーム(緑以下コンver.)
コンテスト
ユーザー kemuniku
提出日時 2023-12-02 14:55:12
言語 PyPy3
(7.3.23 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 125 ms / 2,000 ms
+ 434µs
コード長 381 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 63 ms
コンパイル使用メモリ 81,900 KB
実行使用メモリ 85,728 KB
最終ジャッジ日時 2026-09-26 19:41:07
合計ジャッジ時間 2,246 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge4_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