[프로그래머스, 70128] 내적 (java)
Problem Solving/Programmers

[프로그래머스, 70128] 내적 (java)

728x90

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

 

프로그래머스

SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프

programmers.co.kr

728x90

메모리: 75.1 MB, 시간: 0.04 ms

사용 알고리즘: 구현

class Solution {
    public int solution(int[] a, int[] b) {
        int answer = 0;
        
        for(int i = 0; i < a.length; i++)
            answer += a[i] * b[i];
        
        return answer;
    }
}
728x90