PRF192-Examination 01
Problem 1
[3 Points]
Enter a 3-digit integer, print the maximum number that is based on 3 digits of the given number.
Input
Users are required to enter a 3-digit integer N using the keyboard (STDIN).
Constraint
N (100≤ N ≤999)
Output
Please print out its maximum number that is based on 3 digits of N.
Sample
Input
123
Output
321
920
Sample 1
290
Sample 2
Problem 2
In a slow cycling competition, the champion is the person who takes the longest time to reach the finish line. The competition has exactly three winners:
[4 Points]
1. Champion (1st place)2. Runner-up (2nd place)
3. Third place (3rd place)
Please indicate the time taken by the Runner-up (2nd place) to complete the race.
For example, if there are 10 contestants with finishing times of 2, 5, 7, 1, 3, 6, 9, 4, 6, 9, the champion is the contestant who takes 9 seconds to finish. The runner-up is the second contestant who also takes 9 seconds to complete the race.
Input
The first line contains the number of competitors N.
The second line contains N integers are the time of N competitors, each number separated by one space.
+ 100%
Zoom
Close