結果

問題 No.2272 多項式乗算 mod 258280327
ユーザー kano_suurikano_suuri
提出日時 2023-04-14 23:11:29
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 391 bytes
コンパイル時間 298 ms
コンパイル使用メモリ 82,524 KB
実行使用メモリ 81,496 KB
最終ジャッジ日時 2024-04-18 20:48:56
合計ジャッジ時間 7,331 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
59,184 KB
testcase_01 AC 41 ms
52,224 KB
testcase_02 AC 41 ms
51,712 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 41 ms
51,840 KB
testcase_08 AC 42 ms
52,380 KB
testcase_09 AC 40 ms
52,472 KB
testcase_10 AC 41 ms
52,224 KB
testcase_11 AC 41 ms
51,840 KB
testcase_12 AC 41 ms
52,224 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 40 ms
52,096 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 42 ms
51,968 KB
testcase_19 AC 41 ms
51,712 KB
testcase_20 AC 40 ms
52,224 KB
testcase_21 AC 46 ms
58,624 KB
testcase_22 AC 46 ms
58,240 KB
testcase_23 AC 46 ms
58,240 KB
testcase_24 AC 101 ms
64,128 KB
testcase_25 AC 858 ms
71,424 KB
testcase_26 AC 861 ms
71,424 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 or degG ==0:
    print(0)
else:
    print(L-1)

print(" ".join(ans))
0