You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
369 B

#include <bits/stdc++.h>
using namespace std;
int main() {
int a[1000], b[1000], n;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a[i];
}
for (int i = 0; i < n; i++) {
cin >> b[i];
}
int ab = 0;
for (int i = 0; i < n; ++i) {
ab += a[i] * b[i];
}
cout << ab << endl;
return 0;
}