結果

問題 No.2562 数字探しゲーム(緑以下コンver.)
ユーザー H20
提出日時 2023-12-02 15:17:44
言語 PyPy3
(7.3.15)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 274 bytes
コンパイル時間 172 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 77,056 KB
最終ジャッジ日時 2024-11-19 21:30:59
合計ジャッジ時間 1,953 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 9 RE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())
for _ in range(T):
    M = int(input())
    D = [0] + list(map(int, input().split()))
    S = ''
    for i,d in enumerate(D):
        S+=str(i)*d
    S = int(S)
    if S%M==0:
        print(S)
    else:
        S = (S)*10**9+10**9-1
        print(S-(S%M))

0