結果

問題 No.2272 多項式乗算 mod 258280327
ユーザー FromBooskaFromBooska
提出日時 2023-04-14 23:17:32
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 293 bytes
コンパイル時間 305 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 65,220 KB
最終ジャッジ日時 2024-04-18 20:57:30
合計ジャッジ時間 23,859 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 489 ms
50,768 KB
testcase_01 AC 500 ms
43,584 KB
testcase_02 AC 499 ms
43,460 KB
testcase_03 AC 484 ms
43,456 KB
testcase_04 AC 493 ms
43,564 KB
testcase_05 AC 489 ms
43,712 KB
testcase_06 AC 495 ms
43,840 KB
testcase_07 AC 496 ms
43,716 KB
testcase_08 AC 492 ms
43,712 KB
testcase_09 AC 485 ms
43,456 KB
testcase_10 AC 489 ms
43,840 KB
testcase_11 AC 493 ms
43,708 KB
testcase_12 AC 491 ms
43,712 KB
testcase_13 AC 505 ms
43,712 KB
testcase_14 AC 497 ms
43,460 KB
testcase_15 AC 485 ms
43,712 KB
testcase_16 AC 498 ms
43,716 KB
testcase_17 AC 486 ms
43,692 KB
testcase_18 AC 493 ms
43,688 KB
testcase_19 AC 485 ms
43,948 KB
testcase_20 AC 500 ms
43,456 KB
testcase_21 AC 487 ms
43,708 KB
testcase_22 AC 492 ms
43,456 KB
testcase_23 AC 489 ms
43,584 KB
testcase_24 AC 510 ms
43,720 KB
testcase_25 AC 731 ms
43,696 KB
testcase_26 AC 713 ms
43,464 KB
testcase_27 AC 1,736 ms
44,736 KB
testcase_28 AC 1,591 ms
44,472 KB
testcase_29 TLE -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np

N = int(input())
F = list(map(int, input().split()))
p1 = np.poly1d(F[::-1])
M = int(input())
G = list(map(int, input().split()))
p2 = np.poly1d(G[::-1])
mod = 258280327
r = p1*p2
print(r.order)
coef = r.c
ans = []
for num in coef[::-1]:
    ans.append(num%mod)
print(*ans)
0