1 solutions

  • 1
    @ 2024-9-15 11:28:11
    #include<bits/stdc++.h> 
    using namespace std;
    
    const int maxn = 114514;
    
    int main(){
    	int a, b[maxn], c[maxn], n = 0;
    	cin >> a;
    	for(int i = 0 ; i < a; i++){
    		cin >> b[i];
    	}
    	for(int i = 0 ; i < a; i++){
    		cin >> c[i];
    	}
    	for(int i = 0 ; i < a; i++){
    		n += b[i] * c[i];
    	}
    	cout << n;
    	return 0;
    }
    
    • 1

    Information

    ID
    6935
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    1
    Tags
    # Submissions
    3
    Accepted
    2
    Uploaded By