結果
問題 |
No.1325 Subsequence Score
|
ユーザー |
|
提出日時 | 2020-12-31 00:12:26 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 276 bytes |
コンパイル時間 | 242 ms |
コンパイル使用メモリ | 81,980 KB |
実行使用メモリ | 154,204 KB |
最終ジャッジ日時 | 2024-10-08 08:21:57 |
合計ジャッジ時間 | 4,345 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 WA * 1 |
ソースコード
p = 998244353 N = int(input()) A = list(map(int,input().split())) A.insert(0,0) if N==1: ans = A[1] else: a = 1 i = 0 while i<N-2: a = (a*2)%p i += 1 b = 0 for i in range(1,N+1): b = (b+(i+1)*A[i])%p ans = (a*b)%p print(ans)