Given the last rank ‘L’ and number of candidates at the last rank ‘T’, the task is to find the total number of candidates in Exam.
Input: L = 5, T = 1 Output: 5 Input: L = 10, T = 2 Output: 11
- Suppose L = 5 and T = 2.
- Then there can be many possible rank combinations, like 1, 2, 3, 3, 5, 5.
- So now in this, as you can see the last rank is 5 and there are 2 students at rank 5,
- Therefore, total number of candidates = 6.
- This can be understood by a simple formula:
Below is the Implementation of Above Approach.
- Given number of matches played, find number of teams in tournament
- Find count of digits in a number that divide the number
- Find the number of ways to divide number into four parts such that a = c and b = d
- Find the other number when LCM and HCF given
- Find Nth number of the series 1, 6, 15, 28, 45, .....
- C++ Program to find sum of even factors of a number
- Find the sum of digits of a number at even and odd places
- Find the number after successive division
- Find the frequency of a digit in a number
- Program to find the number of men initially
- Program to find the Nth number of the series 2, 10, 24, 44, 70.....
- C program to Find the Largest Number Among Three Numbers
- Find if two people ever meet after same number of jumps
- Find the repeating and the missing number using two equations
- Number of matches required to find the winner
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.