結果

問題 No.2562 数字探しゲーム(緑以下コンver.)
ユーザー Fullmoon8507
提出日時 2024-02-24 18:11:45
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 543 bytes
コンパイル時間 321 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 12,800 KB
最終ジャッジ日時 2024-11-19 21:41:25
合計ジャッジ時間 2,199 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 9 RE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

times = int(input())
multipleList = list()
numberListList = list()

for i in range(times):
    multipleList.append(int(input()))
    numberListList.append(input().split(" "))

for i in range(times):
    multiple = multipleList[i]
    numberList = numberListList[i]

    Y = ""
    for index, numberString in enumerate(numberList):
        buf = str(index+1) * int(numberString)
        Y = Y + buf
    Y = int(Y)
    # print(Y)
    
    r = Y * pow(10,9) % multiple
    Z = 0 if r == 0 else multiple - r

    X = Y * pow(10,9) + Z
    print(X)
0