Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
160169 王顺煜 求点积 C++ Accepted 2 MS 288 KB 280 2026-09-12 16:33:29

Tests(10/10):


Code:

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