2. The Formula 1 World Championship decided to penalize certain drivers for breaking the rules. Thus, penalty positions are awarded on the starting grid based on the severity of the infraction. The task is to reorder the standings after all penalties have been applied.
Input data: each driver has a unique code consisting of several parts as follows:
- The first digit represents the team number the driver belongs to
- The second and third digits form the driver's race number
- The fourth and fifth digits represent the driver's starting grid position
- The last two digits represent the number of positions the driver is penalized
10 such codes, one for each driver, will be read.
Output data: the standings after all penalties will be displayed in order, separated by a space, with the team number and driver number. Move to a new line after each result.
[
solve in editor]
Author: Achim Vlad | Code: #63 | Hard