Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
1505 | 吴奕希 | 求点积 | C++ | Presentation Error | 0 MS | 264 KB | 405 | 2023-10-03 07:17:04 |
# include<iostream> # include<cstdio> using namespace std; int main() { int n,m,r = 0; cin>>n; int a[n],b[n]; for(int i = 0; i < n; i++) { cin>>m; a[i] = m; } for(int i = 0; i < n; i++) { cin>>m; b[i] = m; } for(int i = 0; i < n; i++) { r += a[i]*b[i]; } printf("\n%d", r); return 0; }