Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
165266 李嘉峻 求点积 C++ Accepted 1 MS 280 KB 284 2026-11-14 13:48:10

Tests(10/10):


Code:

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