Submit | All submissions | Best solutions | Back to list |
EI2122Q1DSAF2 - Employees Working Hours |
Given the list of check-in and check-out time of employees. Output the number of working hours of them.
Input
- The first line contains a number of check-in, check-out records (1 £ N £ 105).
- Each line in the next N lines contains two integers representing a record. First integer is the id of employee. The second integer is the time of check-in/check-out
Output
The list of employees in ascending order of id. For each employee, output the id and the number of working hours.
Sample
Input |
Output |
6 1 4 2 4 1 5 1 6 2 8 1 11 |
1 6 2 4
|
Added by: | Ha Minh Ngoc |
Date: | 2021-12-20 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: GOSU |