Submit | All submissions | Best solutions | Back to list |
EISEAW - Seasonal work |
Given the list of N employees. For each employee, given the wage per hour, the number of working days and the number of working hours per day. Output the list of N employees ordered by income in descending, and name. Note that if the total income is 2 millions or higher, the employee should pay tax at 10% of income.
Input
- The first line contains one integer N - the number of employees
- Each line in the next N lines starts with a string which is the name of the employee, followed by two integers, w and m, which are wage per hour and the number of working days. The rest of the line contains m integers which are the number of working hours in m days.
Output
Each line contains the name, the total working hours and the income.
Sample
Input |
Output |
4 phuc 30000 5 10 8 10 8 10 an 30000 5 10 8 10 10 8 phong 20000 5 8 8 8 8 8 yen 55000 5 10 10 10 10 10
|
phong 40 800000 an 46 1380000 phuc 46 1380000 yen 50 2475000 |
Added by: | Ha Minh Ngoc |
Date: | 2021-03-15 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: GOSU |