結果
問題 |
No.1325 Subsequence Score
|
ユーザー |
![]() |
提出日時 | 2020-12-29 15:33:07 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 503 bytes |
コンパイル時間 | 111 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 71,112 KB |
最終ジャッジ日時 | 2024-10-05 16:01:53 |
合計ジャッジ時間 | 5,753 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 TLE * 1 -- * 17 |
ソースコード
import sys def S(): return sys.stdin.readline().rstrip() def I(): return int(sys.stdin.readline().rstrip()) def MI(): return map(int,sys.stdin.readline().rstrip().split()) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) def LS(): return list(sys.stdin.readline().rstrip().split()) n = I() a = LI() sum = 0 MOD = 998244353 if n == 1: print(a[0]%MOD) else: for i in range(n): sum += a[i]*(2**(n-1)+2**(n-2)*i)%MOD sum %= MOD print(sum)