#K86367. Calculate Employee Bonuses

    ID: 36849 Type: Default 1000ms 256MiB

Calculate Employee Bonuses

Calculate Employee Bonuses

You are given the annual salaries of employees. Your task is to calculate the total compensation for each employee by adding a bonus according to the following scheme:

  • If the salary (s < 50000), the bonus is 5000.
  • If (50000 \leq s \leq 75000), the bonus is 3000.
  • If (s > 75000), the bonus is 2000.

For each employee, output the sum of their salary and the corresponding bonus.

inputFormat

The first line contains an integer (n), representing the number of employees. The second line contains (n) space-separated integers representing the annual salaries.

outputFormat

Output (n) integers separated by a space, where each integer is the total compensation (salary + bonus) for the corresponding employee.## sample

5
45000 55000 60000 80000 120000
50000 58000 63000 82000 122000