문제풀이:
#include <string>
#include <vector>
using namespace std;
int solution(vector<int> a, vector<int> b) {
//int answer = 1234567890;
int answer = 0;
for(int i=0; i<a.size(); i++)
{
answer += a[i]* b[i];
}
return answer;
}
'코딩테스트' 카테고리의 다른 글
프로그래머스_2단계_구명보트_C++ (0) | 2024.04.11 |
---|---|
프로그래머스_1단계_문자열 내 p와 y의 개수_C++ (0) | 2024.04.11 |
프로그래머스_1단계_음양 더하기_C++ (0) | 2024.04.11 |
프로그래머스_0단계_ad 제거하기_C++ (0) | 2024.04.11 |
프로그래머스_0단계_공백으로 구분하기 1C++ (0) | 2024.04.11 |