> For the complete documentation index, see [llms.txt](https://wenbo-notes.gitbook.io/coding/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wenbo-notes.gitbook.io/coding/kattis/easy/betting.md).

# Betting

## Question

{% embed url="<https://open.kattis.com/problems/betting>" %}

## Solution

### Idea

**Time Complexity**: $$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).

### Code

{% @github-files/github-code-block url="<https://github.com/mendax1234/Coding-Problems/blob/main/kattis/betting/betting.c>" %}
