InMobi Interview Report
- -1of 1 vote
AnswersGiven a integer N, print the decimal form of 1/2n.
- avinash.it09 May 31, 2014 in India
Example:
N=1, print 0.5
N=2, print 0.25
Adding leading/unsignificant zeroes will lead to wrong answer. Example, printing 0.50 instead of 0.5 in above case will lead to wrong answer.
Input and Output:
First line contains T, the number of testcases. Each testcase consists of N in one line.
Print required answer in one line for each testcase.
Constraints:
1 ≤ T ≤ 100
1 ≤ N ≤ 200
Sample Input (Plaintext Link)
2
2
1
Sample Output (Plaintext Link)
0.25
0.5
Explanation
You need to print output in decimal form only. There is no limit on number of decimal digits in output.
So correct output of 100 will be "0.0000000000000000000000000000007888609052210118054117285652827862296732064351090230047702789306640625"
Time Limit1 sec(s) (Time limit is for each input file.)
Memory Limit256 MB
Source Limit1024 KB| Report Duplicate | Flag | PURGE
InMobi SDE1