結果

問題 No.2562 数字探しゲーム(緑以下コンver.)
ユーザー Fullmoon8507Fullmoon8507
提出日時 2024-02-24 18:11:45
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 157 ms / 2,000 ms
コード長 543 bytes
コンパイル時間 309 ms
コンパイル使用メモリ 11,776 KB
実行使用メモリ 12,032 KB
最終ジャッジ日時 2024-02-24 18:11:48
合計ジャッジ時間 2,756 ms
ジャッジサーバーID
(参考情報)
judge16 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
9,856 KB
testcase_01 AC 29 ms
9,856 KB
testcase_02 AC 29 ms
9,856 KB
testcase_03 AC 29 ms
9,856 KB
testcase_04 AC 157 ms
12,032 KB
testcase_05 AC 155 ms
12,032 KB
testcase_06 AC 153 ms
11,904 KB
testcase_07 AC 149 ms
12,032 KB
testcase_08 AC 155 ms
12,032 KB
testcase_09 AC 152 ms
12,032 KB
権限があれば一括ダウンロードができます

ソースコード

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