프로그래머스LV1 - 내적

Kong-al·2022년 10월 12일
0

2022.10.12

프로그래머스LV1 - 내적

[ 답안 ]

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;
    }
}
profile
웹개발 공부중!(❁´◡`❁)

0개의 댓글