Please enter your email address or userHandle.
Given a positive floating point number n, the task is to find the smallest integer k, such that when we multiply k with n, we get a natural number.
Input : 30.25
Output : 4
30.25 * 4 = 321, there is no number less than 4 which can convert 30.25 into natural number.
Input : 5.5
Output : 2
5.5 * 2 = 11, there is no number less than 2 which can convert 5.5 into natural number.
The first line of input contains an integer T denoting the no of test cases. Then T test cases follow. Each test case contain a decimal number N.
For each test case in a new line print the required result.
We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?
Login to access your submissions.
Please choose 'ReadOnlyMode' if you needn't to 'Edit' the problem e.g. viewing OJ's solution, TestCase Files (TCFs), TimeLimit etc.