Consider the subject Data Structures for which a total number of classes held till present date is , and some students attend only out of these classes. Find the minimum number of lectures they have to attend so that their attendance is maintained.
Input : M = 7 and N = 6
Output : 0 lectures to attend
As 7 classes held till present out of which 6 classes have been attended which is greater than
75%, so no more lectures to attend
Input : M = 9 and N = 1
Output : 23 lectures to attend
Out of 9 classes, only 1 class is attended. After 23 more classes, a total of 1+23 = 24 classes
have been attended and total number of classes held = 9+23 = 32. So 24/32 = 75%. Hence 23 is
the minimum value.
Using the formula,
Before applying the formula, first, check whether N by M is having 75% or not, if not then apply the formula
GeeksforGeeks has prepared a complete interview preparation course with premium videos, theory, practice problems, TA support and many more features. Please refer Placement 100 for details
- Find minimum number to be divided to make a number a perfect square
- Find the minimum number to be added to N to make it a prime number
- Program to find the minimum (or maximum) element of an array
- Find minimum sum of factors of number
- Find minimum possible digit sum after adding a number d
- Find the minimum number of steps to reach M from N
- Find the minimum number possible by changing at most one digit
- Find minimum number of coins that make a given value
- Find minimum number of Log value needed to calculate Log upto N
- Find minimum number K such that sum of array after multiplication by K exceed S
- Find a number X such that (X XOR A) is minimum and the count of set bits in X and B are equal
- Find the minimum number of rectangles left after inserting one into another
- Find the minimum number to be added to N to make it a power of K
- Find out the minimum number of coins required to pay total amount
- Find minimum number of merge operations to make an array palindrome
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.
Improved By : vt_m