結果

問題 No.1145 Sums of Powers
ユーザー kozykozy
提出日時 2020-07-31 22:09:10
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 294 bytes
コンパイル時間 413 ms
コンパイル使用メモリ 10,944 KB
実行使用メモリ 25,704 KB
最終ジャッジ日時 2023-09-20 23:37:31
合計ジャッジ時間 4,175 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
12,336 KB
testcase_01 AC 16 ms
7,784 KB
testcase_02 AC 168 ms
8,356 KB
testcase_03 TLE -
testcase_04 -- -
testcase_05 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M=map(int,input().split())
A=list(map(int,input().split()))
ans=[1]*N
mod=998244353
ans = [x * y for (x, y) in zip(A, ans)]
R=list()
R.append(sum(ans)%mod)
L=list()
for i in range(M-1):
    ans = [x%mod * y%mod for (x, y) in zip(A, ans)]
    R.append(sum(ans)%mod)
print(" ".join(map(str,R)))
0