結果

問題 No.2562 数字探しゲーム(緑以下コンver.)
コンテスト
ユーザー MM
提出日時 2023-12-02 16:55:35
言語 Python3
(3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
WA  
実行時間 -
コード長 417 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 56 ms
コンパイル使用メモリ 14,976 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2026-09-26 19:48:31
合計ジャッジ時間 2,765 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge4_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 1 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

# 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