8 solutions
-
0
#include <bits/stdc++.h> using namespace std; int main(int argc, char **argv){ int n,a[1005] = {0},b[1005] = {0},cnt = 0; cin >> n; for (int i = 0;i < n;i++){ cin >> a[i]; } for (int i = 0;i < n;i++){ cin >> b[i]; } for (int i = 0;i < n;i++){ cnt += a[i] * b[i]; } cout << cnt; return 0; }
- 1
Information
- ID
- 594
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 2
- Tags
- # Submissions
- 101
- Accepted
- 63
- Uploaded By