結果
問題 |
No.369 足し間違い
|
ユーザー |
|
提出日時 | 2019-08-30 16:02:39 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 219 bytes |
コンパイル時間 | 1,214 ms |
コンパイル使用メモリ | 159,688 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-21 11:54:18 |
合計ジャッジ時間 | 1,697 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 5 |
ソースコード
#include<bits/stdc++.h> using namespace std; int main(){ int n,v,ans; cin>>n; vector<int> a(n); for(int i=0;i<n;++i)cin>>a[i]; cin>>v; ans=accumulate(a.begin(),a.end(),-v); cout<<ans<<endl; }