반응형
내 코드
class Solution {
public int solution(int[] a, int[] b) {
int answer = 0;
for(int i=0 ; i < b.length; i++) {
answer += a[i]*b[i];
}
return answer;
}
}
반응형
'코테 > 프로그래머스' 카테고리의 다른 글
[프로그래머스/Lv. 1] 최대공약수와 최소공배수 (0) | 2023.02.20 |
---|---|
[프로그래머스/Lv. 1] 문자열을 정수로 바꾸기 (0) | 2023.02.20 |
[프로그래머스/Lv. 1] x만큼 간격이 있는 n개의 숫자 (0) | 2023.02.19 |
[프로그래머스/Lv. 1] 자릿수 더하기 (0) | 2023.02.19 |
[프로그래머스/Lv. 1] 직사각형 별찍기 (0) | 2023.02.19 |