코딩테스트/프로그래머스 - LV 1
[프로그래머스] 내적
웅드
2024. 2. 9. 17:05
- 풀이
#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;
}
반응형