내적

magicdrill·2024년 3월 7일
0

내적

#include <string>
#include <vector>

using namespace std;

int solution(vector<int> a, vector<int> b) 
{
    int answer = 0;
    int i, size = a.size();
    
    for(i = 0; i < size; i++)
    {
        answer += a[i] * b[i];    
    }
    
    return answer;
}

0개의 댓글