Betting

Question

Solution

Idea

Time Complexity: O(1)O(1)

This a give-away question. The soul is to find the maths relation between the input and the answer. And this relation is shown in the code below.

Code

https://github.com/mendax1234/Coding-Problems/blob/main/kattis/betting/betting.c

Last updated