단순히 주어진 설명대로 하면 되는 아주 간단한 문제이다.
#include <string> #include <vector> using namespace std; int solution(vector<int> a, vector<int> b) { int answer = 0; for (int i=0; i<a.size(); i++) answer += a[i] * b[i]; return answer; }