Joey is playing the following game wherein the objective is to buy fullhouse ticket with the tokens in hand at the lowest time possible. Tokens help player buy the fullhouse ticket.
In this game player starts with 0 token and the lender lends you 2 tokens per second whenever the player has x tokens. Player can buy the token generator from the lender.
Every token generator gives player extra y tokens per second. Once a player has z tokens which is the cost to buy the fullhouse ticket the game is won.
Figure out the best strategy (least amount of time to win the game).