文件目录

#include <iostream>
#include <numeric>
using namespace std;
int main()
{
    int n;
    int a[1050] = {}, b[1050] = {};
    cin >> n;
    for (int i = 0; i < n; i++)
        cin >> a[i];
    for (int i = 0; i < n; i++)
        cin >> b[i];
    cout << inner_product(a, a + n, b, 0);
    return 0;
}
int ans1()
{
    int n;
    int a[1050] = {};
    cin >> n;
    for (int i = 0; i < n; i++)
        cin >> a[i];
    int sum = 0, b;
    for (int i = 0; i < n; i++)
    {
        cin >> b;
        sum += b * a[i];
    }
    cout << sum;
    return 0;
}