## Challenges

Reddit challenges in python language.

Files Code and Result

### challenge121_easy

```'''
Bytelandian Currency is made of coins with integers on them.
There is a coin for each non-negative integer (including 0).
insert a N-valued coin, with N positive, It pays back 3 coins
of the value N/2,N/3 and N/4, rounded down. For example,
if you insert a 19-valued coin, you get three coins worth 9,
6, and 4. If you insert a 2-valued coin, you get three coins
worth 1, 0, and 0. 0-valued coins cannot be used in this machine.

One day you're bored so you insert a 7-valued coin. You get three
coins back, and you then insert each of these back into the machine.
You continue to do this with every positive-valued coin you get back,
until finally you're left with nothing but 0-valued coins. You count
them up and see you have 15 coins.

How many 0-valued coins could you get starting with a single 1000-valued coin?

Author: Thomas1122
Formal Inputs & Outputs
Input Description

Output Description

The number of 0-valued coins you wind up with after putting every
positive-valued coin you have through the machine.
Sample Inputs & Outputs
Sample Input

7
Sample Output

15
Challenge Input

1000
Challenge Input Solution

???
Note

Hint: use recursion!
'''
N = 1000

lst = [N]
accum = 0

while len(lst) > 0:
coin = lst[0]
for x in range(2, 5):
coins = coin//x
if coin > 0:
if not coins == 0:
lst.append(coins)
else:
accum += 1
lst.remove(coin)

print(accum)
```

```3263
```