結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
57,216 KB
testcase_01 AC 39 ms
52,096 KB
testcase_02 AC 39 ms
51,968 KB
testcase_03 AC 40 ms
51,712 KB
testcase_04 AC 41 ms
51,584 KB
testcase_05 AC 40 ms
51,840 KB
testcase_06 AC 40 ms
52,096 KB
testcase_07 AC 41 ms
52,096 KB
testcase_08 AC 37 ms
52,096 KB
testcase_09 AC 41 ms
52,096 KB
testcase_10 AC 39 ms
52,096 KB
testcase_11 AC 41 ms
52,352 KB
testcase_12 AC 38 ms
51,840 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 41 ms
51,456 KB
testcase_16 AC 41 ms
51,584 KB
testcase_17 AC 44 ms
52,096 KB
testcase_18 AC 41 ms
51,840 KB
testcase_19 AC 39 ms
51,712 KB
testcase_20 AC 39 ms
51,456 KB
testcase_21 AC 45 ms
57,984 KB
testcase_22 AC 47 ms
58,368 KB
testcase_23 AC 45 ms
58,112 KB
testcase_24 AC 98 ms
63,616 KB
testcase_25 AC 776 ms
71,040 KB
testcase_26 AC 771 ms
71,552 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)
else:
    print(L-1)

print(" ".join(ans))
0