結果
| 問題 |
No.1096 Range Sums
|
| コンテスト | |
| ユーザー |
ate
|
| 提出日時 | 2020-07-08 14:19:28 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 202 bytes |
| コンパイル時間 | 502 ms |
| コンパイル使用メモリ | 65,820 KB |
| 最終ジャッジ日時 | 2025-01-11 16:55:17 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 WA * 5 |
ソースコード
#include<iostream>
signed main(){
int n;
std::cin>>n;
int64_t a,ans=0;
for(int i=0;i<n;++i){
std::cin>>a;
ans += (i+1)*(n-i)*a;
}
std::cout << ans << std::endl;
}
ate