結果

問題 No.2562 数字探しゲーム(緑以下コンver.)
ユーザー とろちゃとろちゃ
提出日時 2023-12-02 15:05:27
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 1,057 bytes
コンパイル時間 316 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 75,928 KB
最終ジャッジ日時 2023-12-02 15:05:31
合計ジャッジ時間 2,447 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
53,460 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

# import pypyjit;pypyjit.set_param("max_unroll_recursion=-1")
import os
import sys

# from bisect import *
# from collections import *
# from datetime import *
# from decimal import *  # PyPyだと遅い
# from heapq import *
from itertools import *

# from math import gcd, lcm
# from random import *
# from string import *

# import numpy as np
# from atcoder.dsu import *
# from atcoder.segtree import *
# from more_itertools import *
# from sortedcontainers import *

# sys.setrecursionlimit(10**7)  # PyPyは呪文を付ける
# sys.set_int_max_str_digits(0)
INF = 1 << 61
MOD = 998244353
# MOD = 10**9 + 7
IS_ATCODER = os.getenv("ATCODER", 0)

File = sys.stdin


def input():
    return File.readline().replace("\n", "")


# ///////////////////////////////////////////////////////////////////////////


for _ in range(int(input())):
    M = int(input())
    d = list(map(int, input().split()))
    l = []
    for i, j in enumerate(d, 1):
        if j:
            l.append(str(i) * j)
    n = int("".join(l) + "0" * 9)
    n += M - n % M
    print(n)
0