結果
| 問題 |
No.1325 Subsequence Score
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-12-22 09:25:11 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 308 bytes |
| コンパイル時間 | 215 ms |
| コンパイル使用メモリ | 82,432 KB |
| 実行使用メモリ | 172,704 KB |
| 最終ジャッジ日時 | 2024-09-21 13:59:50 |
| 合計ジャッジ時間 | 4,777 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 WA * 1 |
ソースコード
def main():
import sys
input=sys.stdin.readline
mod=998244353
n=int(input())
if n==1:
print(int(input()))
return
a=list(map(int,input().split()))
p=pow(2,n-2,mod)
ans=0
for i in range(n):
ans=(ans+a[i]*(p*2+i*p))%mod
print(ans)
main()