建議自己寫一遍這題很簡單
import java.util.Scanner;
public class b294 {
public static void main (String[]args){
Scanner input = new Scanner(System.in);
if (input.hasNextInt()){
int n = input.nextInt();
int answer = 0;
for (int i=1;i<n+1;i++){
answer += input.nextInt()*i;
}
System.out.println(answer);
}
}
}