結果
| 問題 |
No.1145 Sums of Powers
|
| ユーザー |
gew1fw
|
| 提出日時 | 2025-06-12 19:07:33 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 528 bytes |
| コンパイル時間 | 375 ms |
| コンパイル使用メモリ | 81,988 KB |
| 実行使用メモリ | 93,124 KB |
| 最終ジャッジ日時 | 2025-06-12 19:07:41 |
| 合計ジャッジ時間 | 3,870 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 TLE * 1 -- * 2 |
ソースコード
MOD = 998244353
def main():
import sys
input = sys.stdin.read().split()
idx = 0
N = int(input[idx])
idx += 1
M = int(input[idx])
idx += 1
A = list(map(int, input[idx:idx+N]))
idx += N
S = [0] * (M + 1)
for a in A:
if a == 0:
continue
current = a
for k in range(1, M + 1):
S[k] = (S[k] + current) % MOD
current = current * a % MOD
print(' '.join(map(str, S[1:M+1])))
if __name__ == '__main__':
main()
gew1fw