GAMES  HOW MANY GAMES
Problem Statement:
A player has played unknown number of games. We know the average score of the player (sum of scores in all the games / no. of games). Find the minimum number of games the player should have played to achieve that average.
The player can score any nonnegative 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.
Input Constraints:
1<=t<=1000
1<=avg<=1000000 (maximum 4 digits after the decimal place)
Example:
Sample Input:
3
5
5.5
30.25
Sample Output:
1
2
4
Added by:  cegprakash 
Date:  20121012 
Time limit:  0.185s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel Pentium G860 3GHz) 
Languages:  All except: SCM chicken 
hide comments
Ankit Sultana:
20150228 06:05:35
Can be done without strings per se 

Saksham :
20150127 23:08:56
beware of floating pt errors costed me 1WA


deathgun:
20150114 21:37:18
good question and must for beginners :) 

rahul goyal:
20150107 19:21:23
very gud questn (y) 

Anand:
20141224 17:50:44
u have python , u have power !!! 

Kushal Singh:
20141218 13:49:41
well ...just so that you know ...using double might not be a good idea :P 

Shivam kumar :
20140918 13:30:03
if avg = 3.3333


Bodh Almast:
20140803 18:37:29
any tricky test case?


kiran pilli:
20140713 06:14:40
learnt a new thing..nice problem


ήάέέϻ Ÿ:
20140712 23:12:51
nice and easy :) good question :) 