Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
117375 | 翁思宸 | 求点积 | C++ | Accepted | 1 MS | 280 KB | 492 | 2025-04-18 18:32:10 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int a[10000],b[10000],n,s=0; cin>>n; for(int i=0;i<n;i++){ cin>>a[i]; } for(int j=0;j<n;j++){ cin>>b[j]; } for(int k=0;k<n;k++){ s+=a[k]*b[k]; } cout<<s; return 0; }