백준 2845 java
import java.util.Scanner;
import java.util.Vector;
public class bj2845 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int L, P, i, temp, total;
Vector<Integer> data = new Vector<>();
L = scanner.nextInt();
P = scanner.nextInt();
for(i = 0; i < 5; i++)
{
temp = scanner.nextInt();
data.add(temp);
}
total = L * P;
for(i = 0; i < data.size(); i++)
{
temp = data.get(i);
System.out.print(temp - total + " ");
}
System.out.println();
scanner.close();
}
}