結果

問題 No.2272 多項式乗算 mod 258280327
ユーザー kano_suurikano_suuri
提出日時 2023-04-14 23:15:59
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 439 bytes
コンパイル時間 211 ms
コンパイル使用メモリ 82,316 KB
実行使用メモリ 82,760 KB
最終ジャッジ日時 2024-04-18 20:55:01
合計ジャッジ時間 7,131 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
57,600 KB
testcase_01 AC 36 ms
52,224 KB
testcase_02 AC 36 ms
51,712 KB
testcase_03 AC 37 ms
51,840 KB
testcase_04 AC 36 ms
52,096 KB
testcase_05 AC 37 ms
52,212 KB
testcase_06 AC 36 ms
51,968 KB
testcase_07 AC 35 ms
51,816 KB
testcase_08 AC 36 ms
52,224 KB
testcase_09 AC 37 ms
51,712 KB
testcase_10 AC 39 ms
52,276 KB
testcase_11 AC 35 ms
51,940 KB
testcase_12 AC 35 ms
52,096 KB
testcase_13 AC 36 ms
52,480 KB
testcase_14 AC 37 ms
52,096 KB
testcase_15 AC 37 ms
52,352 KB
testcase_16 AC 37 ms
51,840 KB
testcase_17 AC 38 ms
52,352 KB
testcase_18 AC 36 ms
52,480 KB
testcase_19 AC 36 ms
52,352 KB
testcase_20 AC 41 ms
51,968 KB
testcase_21 AC 41 ms
58,240 KB
testcase_22 AC 41 ms
58,368 KB
testcase_23 AC 41 ms
58,496 KB
testcase_24 AC 93 ms
64,128 KB
testcase_25 AC 835 ms
72,192 KB
testcase_26 AC 842 ms
71,680 KB
testcase_27 TLE -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

degF = int(input())
F = list(map(int, input().split()))
degG = int(input())
G = list(map(int, input().split()))
L = degF + degG + 1
ans = [0]*L

for i in range(degF+1):
    for j in range(degG+1):
        ans[i+j] += (F[i]% 258280327)*(G[j] % 258280327)
for _ in range(L):
    ans[_] = str(ans[_] % 258280327)
if (degF == 0 and F[0] == 0) or (degG ==0 and G[0] == 0):
    print(0)
    print(0)
else:
    print(L-1)
    print(" ".join(ans))
0