3. Consolation Prizes
The semester is over and all of the students at school have ranked according to their marks.The
principal is going to award prizes to each student who has achieved a certain rank or higher. Students with
equal marks will have equal ranks, but the next lower marks will be ranked based on the position with in the
list of all student's marks,
For example, if marks = [100, 50,
there are 3 people with higher
k = 3, there are 3 students who
many students will receive a p
2
Note: Any student with a score of o cannot
Write a program that takes input in the below given format and
power
3
Constraints
1sns 105
• Osm[i] = 100
• Ksn
Input Format For Custom Testing
Sample Case o
Sample Case 1
Answers
Answered by
0
Explanation:
. Consolation Prizes
The semester is over and all of the students at school have ranked according to their marks.The
principal is going to award prizes to each student who has achieved a certain rank or higher. Students with
equal marks will have equal ranks, but the next lower marks will be ranked based on the position with in the
list of all student's marks,
For example, if marks = [100, 50,
there are 3 people with higher
k = 3, there are 3 students who
many students will receive a p
2
Note: Any student with a score of o cannot
Write a program that takes input in the below given format and
power
3
Constraints
1sns 105
• Osm[i] = 100
• Ksn
Input Format For Custom Testing
Sample Case o
Sample Case 1
Similar questions