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 / no. 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.
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.
For each test case, find the minimum number of matches the player should have played to achieve that average.
1<=avg<=1000000 (maximum 4 digits after the decimal place)
good ques...those getting WA work on these test cases...
what will be output for 3.33
@fly_sky12 It'll be 10000
if input is 3.3333
nice problem (plz don't use double...)
Nice problem... :-)
learned about double precision
Prakhar Dev Gupta:
AC in a GO!
RADHE SHYAM LODHI:
Boundary conditions...getting 1st TLE and then wrong answer....