結果

問題 No.2562 数字探しゲーム(緑以下コンver.)
ユーザー MM
提出日時 2023-12-02 16:55:35
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 417 bytes
コンパイル時間 338 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-11-19 21:34:37
合計ジャッジ時間 3,335 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 1 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

# Read the number of test cases
t = int(input())

N = 1000000000

for _ in range(t):
    # Read M for each test case
    M = int(input())
    ans = 0

    # Process the nine digits
    d = list(map(int, input().split()))
    for i in range(1, 10):
      for j in range(0,d[(i-1)]):
          ans *= 10
          ans += i

    # Calculate and print the final answer
    ans *= N
    ans += M - (ans % M)
    print(ans)
0