結果
問題 |
No.1145 Sums of Powers
|
ユーザー |
![]() |
提出日時 | 2025-06-12 14:07:14 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 528 bytes |
コンパイル時間 | 370 ms |
コンパイル使用メモリ | 82,972 KB |
実行使用メモリ | 92,580 KB |
最終ジャッジ日時 | 2025-06-12 14:07:50 |
合計ジャッジ時間 | 4,089 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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()