#K62472. Work Hours Percentage Calculation
Work Hours Percentage Calculation
Work Hours Percentage Calculation
Given a list of employees and their reported work hours, calculate the percentage of total work hours contributed by each employee. For an employee with work hours \(h\) and a total of \(T\) hours, the percentage is computed as \(\frac{h}{T} \times 100\%\). Ensure that the result for each employee is formatted to two decimal places.
This problem simulates a typical scenario in workforce management, requiring precise calculations and careful handling of floating point arithmetic.
inputFormat
The first line contains an integer \(N\) representing the number of employees. Each of the following \(N\) lines contains an employee's name (a string without spaces) and the number of hours they worked (an integer), separated by a space.
outputFormat
Print \(N\) lines. Each line should contain the employee's name followed by a colon and a space, then the percentage of total work hours they contributed. The percentage must be formatted to two decimal places and suffixed with a '%' sign.
## sample1
Alice 8
Alice: 100.00%
</p>