GAMES - How Many Games?

A player has played unknown number of games. We know the average score of the player (sum of scores in all the games / number of games). Find the minimum number of games the player should have played to achieve that average.

The player can score any non-negative integer score in a game.

Input

The first line consists of an integer t, the number of test cases. Each test case consists of a single rational number which represents the average score of the player.

Output

For each test case, find the minimum number of matches the player should have played to achieve that average.

Constraints

1 <= t <= 1000
1 <= average <= 1000000 (maximum 4 digits after the decimal place)

Example

Input:
3
5
5.5
30.25

Output:
1
2
4

Added by:cegprakash
Date:2012-10-12
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64

hide comments
2014-03-31 08:45:17 nitesh kumar
think simple..
2014-02-17 17:09:32 leem
what if average is 3.3
2014-02-15 06:59:45 NOVICE
pow() function showing unexpected behaviour>>>>don't know why????

CAN ANYBODY EXPLAIN TO ME??
2014-01-07 19:04:16 anurag garg
very good logical problem....
2013-11-05 12:54:36 Ayush
My 100th :-)
2013-11-03 08:32:46 AbK
My 100th :-)
2013-08-29 07:38:04 shannider
TLE!! any suggestion?
2013-08-13 13:08:45 Adam D
Finally AC....

Last edit: 2013-08-13 16:06:40
2013-08-11 18:53:05 innovolt
after getting many WA got AC ....changed strategy used char array to store number........
2013-07-30 18:09:49 kunal keshwani
really good one:)
learned something new about conversions..
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.