i was having trouble with 545 so i started searching the forums and found out that it was multiple input but it says nothing about that in the problem and the input sample is not in the format of a multiple input.

pc5971,
I'm trying the problem using a different algo. I have all the correct floats(x.xxx) and the ints (y). I'm having trouble with output precission. I got my code to get the same output as you for all ints from 1 to 1000000. I submitted both your code and mine. They both get WA. You said your code got AC, but it doesn't seem so.

I understand 474 is not multiple input but 545 is. Could anyone send critical output for 474?

Jackie, I got AC with 474, but keep getting WA with 545. I tried to hard code the cases of n=6 and n=7. But I still got WA. Could you send your AC code by PM? I'll only use it to compare output. Thanks in advance.

Hi,
I have tried this problem about thousands, and thousands of ways, but I always obtain WA. In this code I search the precision, but I don't get AC. Please, Can anyone say me what is the cases that is wrong in my code, please, or send me the 9000 posible cases with its output, please. I can't understand that is wrong .

I haven't attempted to solve the problem but there are several errors I see in your program.
1) You shouldn't get the number of cases from the input stream . The first line isn't the number of cases. it is the first number fot which you have to produce an output.
2)The remaining part of your input code is also wrong. As far as I understand you should only use getc in this program,not gets and scanf, because you don't know the number of cases in advance.
3)I don't think you have a precision problem , because you used repeated squaring but just in case you do, I suggest you multiply the decimal logarithm of 0.5 by the number given , take its fractional part and exponentiate it to get the number before the E.
Try this and tell me if it works.

1) You shouldn't get the number of cases from the input stream . The first line isn't the number of cases. it is the first number fot which you have to produce an output.
2)The remaining part of your input code is also wrong. As far as I understand you should only use getc in this program,not gets and scanf, because you don't know the number of cases in advance.

3)I don't think you have a precision problem , because you used repeated squaring but just in case you do, I suggest you multiply the decimal logarithm of 0.5 by the number given , take its fractional part and exponentiate it to get the number before the E.

I'll try this later, and I'll tell you the result, now I have a lot of exams.
Thanks!

You're right this is a multiple input problem, also the precision is difficult to get right.
Personally, I implemented *exact* computation (which is possible because when you divide by 2 you always get a finite number of digits) to know where I got my errors. Of course I didn't submit that code because it would get time limit exceeded, but it helped me find my errors.

I had a bug with '9' + 1 = ':'.
I had another bug (maybe never I would have discovered), if you have 1.11550 the correct answer is 1.116, and for my previous program was 1.155, I thought that 1.155 was the correct answer but no.