結果
問題 |
No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
|
ユーザー |
![]() |
提出日時 | 2017-06-18 18:01:31 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 71 ms / 2,000 ms |
コード長 | 299 bytes |
コンパイル時間 | 471 ms |
コンパイル使用メモリ | 59,252 KB |
実行使用メモリ | 7,504 KB |
最終ジャッジ日時 | 2024-10-01 20:21:36 |
合計ジャッジ時間 | 2,570 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 15 |
ソースコード
#include<iostream> #include<string> #include<vector> using namespace std; int main(){ long long n; vector <long long> a; cin >> n; long long tmp; for(int i=0; i<n; i++) { cin >> tmp; a.push_back(tmp); } long long ans=0; for(int i=0; i<n; i++){ ans += a[i]; } cout << ans; }