Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
107086 | 顾梦琪 | 求点积 | C++ | Accepted | 1 MS | 276 KB | 309 | 2025-01-17 12:14:02 |
#include<bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int a[n]; int b[n]; for (int i = 0; i < n; i++) { cin >> a[i]; } for (int i = 0; i < n; i++) { cin >> b[i]; } int d = 0; for (int i = 0; i < n; i++) { d = d + a[i] * b[i]; } cout << d; return 0; }