Question: Python Code The fraction 4 9 / 9 8 is a curious fraction. An inexperienced mathematician while attempting to simplify it may incorrectly believe that
Python Code
The fraction is a curious fraction. An inexperienced mathematician while attempting to simplify it may incorrectly believe that is obtained by cancelling the s
We shall consider fractions like, to be trivial examples.
Which means fractions where trailing s are cancelled are trivial. So we will ignore all the cases where we have to cancel s
You will be given integers N and K N represents the number of digits in Numerator and Denominator, and K represents the exact number of digits to be "cancelled" from Numerator and Denominator. Find every nontrivial fraction, where numerator is less than denominator, and the value of the reduced fraction is equal to the original fraction.
Sum all the Numerators and the Denominators of the original fractions, and print them separated by a space.
Input Format
Input contains two integers N K
Constraints
N
KN
Output Format
Display space separated integers that denote the sum of the Numerators and the sum of the Denominators respectively of original fractions.
Note You do not have to reduce the Numerator and Denominator.
Sample Input
Sample Output
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
