405373: GYM101917 F Minimum Played Times

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

F. Minimum Played Timestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

Diego is looking at some stats from a game and he sees percentages of success for given events. Diego wonders what is the minimum amount of times each event had to happen in order to get that success percent.

Input

An integer N ($$$1<=N<=10{^5}$$$), the number of events in the game. N real numbers, each in its own line and with maximum 4 decimals after the point. Note: You should consider that numbers provided in the input are not ceiled, rounded nor truncated. ($$$0<=pi<=1$$$)

Output

N integers, the minimum amount of times each event had to occur in order to get that percent.

ExampleInput
4
0.20
0.50
0.025
0.3333
Output
5
2
40
10000

Source/Category

加入题单

算法标签: