1 条题解
-
1
#include <iostream> #include <vector> using namespace std; vector<int> a , b; int main(){ int n , tmp; cin >> n; for(int i = 0; i < n; i++){ cin >> tmp; a.push_back(tmp); } for(int i = 0; i < n; i++){ cin >> tmp; b.push_back(tmp); } int ans = 0; for(int i = 0; i < n; i++){ ans = ans + a[i] * b[i]; }\ cout << ans; return 0; }
- 1
信息
- ID
- 683
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 6
- 标签
- (无)
- 递交数
- 57
- 已通过
- 18
- 上传者