Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
136709 杜禹轩 求点积 C++ Accepted 1 MS 280 KB 276 2025-11-15 14:59:27

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int a[1001],b[1001]; long long n, m=0; 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++){ m+=a[i]*b[i]; } cout<<m; return 0; }