포스트

프로그래머스 — CodeKata 16

출처: https://school.programmers.co.kr/learn/courses/30/lessons/70128

1
2
3
4
5
6
7
8
9
10
11
12
13
14
//https://school.programmers.co.kr/learn/courses/30/lessons/70128

#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;
}
이 기사는 저작권자의 CC BY 4.0 라이센스를 따릅니다.