結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー kusaf_kusaf_
提出日時 2021-02-03 18:34:11
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 72 ms / 2,000 ms
コード長 206 bytes
コンパイル時間 1,582 ms
コンパイル使用メモリ 166,268 KB
実行使用メモリ 6,932 KB
最終ジャッジ日時 2023-09-12 15:26:44
合計ジャッジ時間 3,643 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 2 ms
4,384 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 7 ms
4,380 KB
testcase_08 AC 26 ms
4,380 KB
testcase_09 AC 25 ms
4,376 KB
testcase_10 AC 57 ms
6,164 KB
testcase_11 AC 60 ms
6,132 KB
testcase_12 AC 61 ms
6,448 KB
testcase_13 AC 62 ms
6,496 KB
testcase_14 AC 63 ms
6,624 KB
testcase_15 AC 65 ms
6,316 KB
testcase_16 AC 72 ms
6,932 KB
testcase_17 AC 2 ms
4,376 KB
testcase_18 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

int main()
{
  int64_t n,ans;
  cin>>n;
  ans=0;
  vector<int64_t> a(n);
  for(int i=0;i<n;i++)
  {
    cin>>a.at(i);
    ans+=a.at(i);
  }
  cout<<ans<<endl;
}
0