結果

問題 No.2562 数字探しゲーム(緑以下コンver.)
ユーザー rlangevin
提出日時 2025-01-15 00:34:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 77 ms / 2,000 ms
コード長 302 bytes
コンパイル時間 387 ms
コンパイル使用メモリ 82,548 KB
実行使用メモリ 76,640 KB
最終ジャッジ日時 2025-01-15 00:34:36
合計ジャッジ時間 1,869 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

T = int(input())
for _ in range(T):
    M = int(input())
    d = list(map(int, input().split()))
    n = ""
    for i in range(9):
        n += str(i + 1) * d[i]
    if not n:
        n = M
    n = int(n)
    n *= 10 ** 9
    n = (n + M - 1) // M * M
    print(n)
0