ssss

刘宇帆  •  7天前


#include<bits/stdc++.h> 
using namespace std; 
int main() { 
vector<int> a,b; 
int sum=0,n,t; 
cin >> n; 
for (int i = 0; i < n; i++) { 
 cin >> t; 
 a.push_back(t); 

for (int i = 0; i < n; i++) { 
 cin >> t; 
 b.push_back(t); 

for (int i = 0; i < n; i++) { 
 sum=sum+a[i]*b[i]; 

cout<<sum; 
return 0; 
}


评论: