結果
| 問題 | 
                            No.1325 Subsequence Score
                             | 
                    
| コンテスト | |
| ユーザー | 
                             tktk_snsn
                         | 
                    
| 提出日時 | 2020-12-22 02:51:30 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 264 bytes | 
| コンパイル時間 | 162 ms | 
| コンパイル使用メモリ | 12,416 KB | 
| 実行使用メモリ | 67,952 KB | 
| 最終ジャッジ日時 | 2024-09-21 13:40:45 | 
| 合計ジャッジ時間 | 7,616 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | WA * 3 | 
| other | AC * 1 WA * 27 | 
ソースコード
N = int(input())
A = list(map(int, input().split()))
mod = 998244353
if N == 1:
    print(A[0])
    exit()
ans = 0
cnt = pow(2, N - 1, mod)
d = pow(2, N - 2, mod)
print(cnt, d)
for a in A:
    ans += a * cnt
    ans %= mod
    cnt += d
    cnt %= mod
print(ans)
            
            
            
        
            
tktk_snsn