結果

問題 No.1145 Sums of Powers
ユーザー kozy
提出日時 2020-07-31 21:57:59
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 292 bytes
コンパイル時間 211 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 30,220 KB
最終ジャッジ日時 2024-07-06 17:57:51
合計ジャッジ時間 4,359 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 2 WA * 1 TLE * 1 -- * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M=map(int,input().split())
A=list(map(int,input().split()))
ans=[1]*N
ans = [x * y for (x, y) in zip(A, ans)]
R=list()
R.append(sum(ans))
mod=998244353
L=list()
for i in range(2,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