結果
問題 | No.1096 Range Sums |
ユーザー |
![]() |
提出日時 | 2021-03-15 17:39:55 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 37 ms / 2,000 ms |
コード長 | 243 bytes |
コンパイル時間 | 1,696 ms |
コンパイル使用メモリ | 166,108 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-07 05:04:45 |
合計ジャッジ時間 | 2,841 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 12 |
ソースコード
#include <bits/stdc++.h>using namespace std;int main() {int N;cin >> N;long long ans = 0;for(int i = 0; i < N; i++) {long long A;cin >> A;ans += A*(i+1)*(N-i);}cout << ans << endl;}