자바로 한번 풀어볼 겸 쉬운 문제를 풀어보았다.
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
class Main {
public static void main(String[] args) throws IOException {
InputStreamReader ir = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(ir);
int n = Integer.parseInt(br.readLine());
int[] arr = new int[n];
StringTokenizer st = new StringTokenizer(br.readLine());
for (int i = 0; i < n; i++) {
arr[i] = Integer.parseInt((st.nextToken()));
}
st = new StringTokenizer(br.readLine());
int B = Integer.parseInt(st.nextToken());
int C = Integer.parseInt(st.nextToken());
long sum = n;
for (int i = 0; i < n; i++) {
arr[i] -= B;
}
for (int i = 0; i < n; i++) {
if (arr[i] <= 0)
continue;
int num = arr[i] / C;
if (arr[i] % C != 0)
num++;
sum += num;
}
System.out.println(sum);
}
}