Олимпиадный тренинг

Задача 39014. Result bonus. Training task - 1


In quizzz "Pass the exam for 100 points" You can score up to 10,000 points. At the end of the game, the first K participants who scored the most points receive a bonus to their points in the form of +30% of the scores.  You know the information about how many points each participant in the game scored. Determine the maximum number of points that the bonus did not apply to, as well as the integer part of the total bonus amount received by the players.

Input and output data
The first line input file contains two numbers separated by spaces: N – total number of players (a natural number not exceeding 10,000) and K – the number of players who receive the bonus. The following N lines contain the results of each participant (the number of points scored - all natural numbers not exceeding 10,000), each in a separate line.  
Write down two numbers in your answer: first, the maximum number of points to which the bonus did not apply, and then the whole part of the sum of all bonuses.

Example input file:
12 4
370
580
3000
1310
1700
2810
1660
1250
1870
1340
1400
1260


With such initial data, the answer should contain two numbers – 1660 2814.