結果
問題 | No.1096 Range Sums |
ユーザー |
👑 |
提出日時 | 2021-12-08 00:10:49 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 35 ms / 2,000 ms |
コード長 | 240 bytes |
コンパイル時間 | 498 ms |
コンパイル使用メモリ | 66,612 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-08 03:57:08 |
合計ジャッジ時間 | 1,264 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 12 |
ソースコード
#include <iostream>#include <vector>using namespace std;int main(){long long ans = 0;int n;cin>>n;for(long long i = 0; n > i; i++){long long x;cin>>x;ans += (i+1)*(n-i)*x;}cout << ans << endl;}