結果

問題 No.2111 Sum of Diff
ユーザー syunsukesyunsuke
提出日時 2022-11-27 00:16:30
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 214 bytes
コンパイル時間 446 ms
コンパイル使用メモリ 82,164 KB
実行使用メモリ 110,484 KB
最終ジャッジ日時 2024-04-14 09:49:17
合計ジャッジ時間 5,164 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
58,868 KB
testcase_01 AC 38 ms
52,212 KB
testcase_02 TLE -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
L = list(map(int,input().split()))
L = L[::-1]
S = 0
mod = 998244353
S = 1
SUM = L[0]
ans = 0
for i in range(1,len(L)):
    ans += L[i]*S - SUM
    SUM += (SUM + L[i])
    S += (S+1)
print(ans%mod)
0