結果

問題 No.2562 数字探しゲーム(緑以下コンver.)
ユーザー 👑 KazunKazun
提出日時 2024-01-21 11:49:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 98 ms / 2,000 ms
コード長 426 bytes
コンパイル時間 431 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 76,532 KB
最終ジャッジ日時 2024-01-21 11:49:50
合計ジャッジ時間 2,728 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

def solve():
    M = int(input())
    d = [0] + list(map(int, input().split()))

    X_str = ''
    for i in range(1, 10):
        X_str += str(i) * d[i]

    X = int(X_str + ('0' * (18 - len(X_str))))
    X += (M - X % M) % M
    return X

#==================================================
import sys
input=sys.stdin.readline
write=sys.stdout.write

T = int(input())
write("\n".join(map(str, [solve() for t in range(T)])))
0