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
2012-11-10 11:28:00 nikoo28
got AC... :)

Last edit: 2012-11-11 14:08:48
2012-11-09 19:43:53 aristofanis
Can you give me some tricky test-cases? I can't understand why I'm getting WA.
2012-11-02 00:55:31 Ahmed AKram
finally AC, nice problem !
2012-10-26 19:34:02 Aniket Kumar
@Aditya Pande ,very true ;had to do a lot of experiments with my code.Finally got AC , what a relief.

Last edit: 2012-10-26 19:35:46
2012-10-24 17:42:07 Aditya Pande
really learned something from this problem
2012-10-22 08:58:58 Ehor Nechiporenko
One more test for guys:
3.16 -> 25
2.98 -> 50
2012-10-21 17:58:12 Aaquib Khwaja
More test cases please..
2012-10-20 09:36:23 Vaishali Behl
Could someone please provide some more test cases?I don't understand why I am getting a WA.

Last edit: 2012-10-21 05:22:33
2012-10-19 09:29:59 Ehor Nechiporenko
Easy nice problem
2012-10-18 19:04:34 Pranay
simple but nice logic :)

Last edit: 2012-10-19 02:53:15
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.