Company: Texas

Difficulty: medium

Problem Statement

Rumble Raffle You start with zero tokens and earn 2 tokens per second. A generator costs `X` tokens and permanently adds `Y` tokens per second. A raffle ticket costs `Z` tokens. Buy any number of generators at integer seconds, then buy the ticket as soon as possible. Print the minimum number of seconds needed. Input `X`, `Y`, and `Z`. Output Minimum time in seconds. Constraints All values are between `1` and `1000000`.

More Texas OA questionsInterview experiences