#K88892. Draw Cards Until Sum Exceeds Threshold
Draw Cards Until Sum Exceeds Threshold
Draw Cards Until Sum Exceeds Threshold
You are given a threshold X. Starting with a random draw of cards, each card has an integer value uniformly chosen from 1 to 13 (inclusive). Your task is to simulate drawing cards repeatedly until the running total sum of the drawn cards exceeds X. To ensure deterministic results for this problem, you must initialize the random number generator with a fixed seed of 42.
The process is as follows:
- Set the random seed to 42.
- Draw a card (its value is a random integer between 1 and 13, inclusive).
- Add the card's value to a running sum.
- Repeat drawing cards until the running sum exceeds the input threshold X.
- Output the number of cards drawn.
Note: Because the randomness is fixed via the seed, the solution is deterministic and can be tested with fixed expected outputs.
inputFormat
The input consists of a single integer X (0 ≤ X ≤ 109) which is the threshold sum that must be exceeded.
outputFormat
Output a single integer representing the number of cards drawn until the running sum exceeds X.
## sample1
1
</p>