SUAPC 2023 Summer
Time limit1sMemory limit1024 MB
Given N, output the solved count and total penalty of the Nth-place team on the SUAPC 2023 Summer scoreboard, which is a lookup from the image.
- Level
Easy1 of 10
- Topics
- Implementation
- Solved
- No attempts yet
Problem

[Figure] SUAPC 2023 Summer scoreboard
SUAPC is a programming contest for undergraduate students and first-year graduate students at five universities in Sinchon: Sogang, Sookmyung, Yonsei, Ewha, and Hongik. The contest problems follow the problem-setting style of the Seoul Regional. Teams are ranked by how many problems they solve correctly within the time limit. The image above is the scoreboard of SUAPC 2023 Summer.
Teams that solve more problems rank higher. If several teams solve the same number of problems, the team with the smaller total penalty ranks higher. The rightmost number on the scoreboard above is the total penalty of each team's solved problems.
The penalty for a solved problem is (time of the first accepted submission) + (number of wrong submissions before the first accepted submission) × 20.
Given a positive integer , find the number of problems solved and the total penalty of the team that placed th in SUAPC 2023 Summer.
Input
The first line contains a positive integer . ()
Output
Print the number of problems solved and the total penalty of the team that placed th in SUAPC 2023 Summer, separated by a space.