In solving a question related to permutations and probability, I have got stuck at the following problem, where I need to print the reciprocal of a number and the range of the number can go up to 10 105.
Possible Approach which I looked into for printing that number is: -Using own java class/BigInteger as per following ques :
How to handle very large numbers in Java without using java.math.BigInteger
But the limitation is, it still cannot cater to the limit required.
I also looked for another approach but that was in python. For example, following logic in python works fine:
x=int(input()) print x*'0'
If the input is 100000 then the output is : 100000 times 0 written in the console.
What is some other good approach to solve the given issue?
Thanks in Advance.