import java.util.*;
class Solution {
public int solution(int[] A, int[] B) {
int answer = 0, cnt = 0;
int[] sub_b = new int[B.length];
for(int i = B.lenght - 1; i >= 0; i--) {
sub_b[cnt] = B[i];
cnt++;
}
for(int i = 0; i < A.length; i++) {
answer += A[i] * sub_b[i];
}
return answer;
}
}