#C547. Calculate Employee Rewards
Calculate Employee Rewards
Calculate Employee Rewards
You are given the number of tasks completed by each employee. For each employee, if the number of tasks is even, the reward is \(\frac{task}{2}\); if it is odd, the reward is \(2 \times task\). Your job is to compute the reward for each employee.
Input is provided as the number of employees followed by the list of tasks completed by each employee. Output the rewards for all employees in the same order, separated by spaces.
inputFormat
The first line contains a single integer \(n\) which indicates the number of employees. The second line contains \(n\) space-separated integers where each integer represents the number of tasks completed by an employee.
outputFormat
Output a single line with \(n\) space-separated integers representing the reward for each employee computed as follows: if an employee completed an even number of tasks, the reward is equal to half the number of tasks; if odd, the reward is double the number of tasks.
## sample4
4 7 2 5
2 14 1 10