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
hide comments
cjchirag7:
20191213 14:28:58
Try using long double instead of double to pass all the testcases 

kishorerabha:
20191031 15:16:40
why doesn't using double work? are the values being provided have decimal places more than 15? 

pratiyush_05:
20190602 16:42:36
Was not working with double so I tried with string and BAAM ,....got accepted 

problem_solved:
20190123 14:35:50
Remember that the input is a rational number which means [spoiler] Last edit: 20190502 09:47:37 

saurabhshadow:
20181103 22:38:48
hi


shashankpathak:
20181102 17:55:44
Why can't we think like [spoiler] will be the answer?? Last edit: 20190105 12:27:32 

manjeet_:
20180708 15:48:37
do it by getting input in a string...dont use double...dunno why its giving WA 

karan_yadav:
20180628 09:56:55
Spent an hour wondering why 2.3333 won't pass :(.


sinersnvrsleep:
20180206 12:16:11
dont give up on this question very easy start with the very basic of [spoiler] Last edit: 20180822 16:05:04 

bks19:
20170705 05:27:50
Dont use double use string for input ;even though ur answer is correct using double. 
Added by:  cegprakash 
Date:  20121012 
Time limit:  0.185s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 