# Task
Some children are playing rope skipping game. Children skip the rope at roughly the same speed: `once per second`. If the child fails during the jump, he needs to tidy up the rope and continue. This will take `3 seconds`.

You are given an array `failedCount`, where each element is the jump count at the failed. ie. `[12,23,45]` means the child failed 3 times in the game process. The 1st mistake occurred when he jumped 12 times; The 2nd mistake occurred when he jumped 23 times; The 3rd mistake occurred when he jumped 45 times.

Your task is to calculate how many times the child jumped in 60 seconds.

Note: Each child persisted at least 60 jumps, which meant it could have been over 60 seconds, but the child continued to skip rope.

# Input/Output

`[input]` integer array `failedCount`

`0 ≤ failedCount.length ≤ 60`

`1 ≤ failedCount[i] ≤ 60`

`[output]` an integer

how many times the child jumped in 60 seconds.


# Example

For `failedCount = []`, the output should be `60`.

There is no mistake in the game process. So the child jumped 60 times in 60 seconds.

For `failedCount = [12, 23, 45]`, the output should be `51`.
```
The 1st mistake occurred when he jumped 12 times. --> 12 seconds past.
Tidy up the rope and continue.                    --> 15 seconds past.
The 2nd mistake occurred when he jumped 23 times. --> 26 seconds past.
Tidy up the rope and continue.                    --> 29 seconds past.
The 3rd mistake occurred when he jumped 45 times. --> 51 seconds past.
Tidy up the rope and continue.                    --> 54 seconds past.
When he jumped 51 times                           --> 60 seconds past.
```

Difficulty: EASY
Starter code: def tiaosheng(failed_counter):
	

Solutions:
def tiaosheng(a):
	(j, t) = (0, 0)
	for j in a:
		t += 3
		if j + t > 60:
			return min(j, 60 - t + 3)
	return 60 - t


def tiaosheng(failed_counter):
	count = 0
	jumps = 0
	while count < 60:
		count += 1
		jumps += 1
		if jumps in failed_counter:
			count += 3
	return jumps


def tiaosheng(fails):
	return 60 - sum((1 for (i, f) in enumerate(fails) for k in range(3) if 3 * i + f + k < 60))


def tiaosheng(arr):
	t = 0
	j = 0
	while t < 60:
		t += 1
		j += 1
		if j in arr:
			t += 3
	return j


def tiaosheng(failed_counter):
	n = 60
	for c in failed_counter:
		if c <= n:
			n -= min(3, n - c)
	return n


def tiaosheng(failed_counter):
	jump = 60
	for failed in failed_counter:
		if failed < jump:
			jump -= min(jump - failed, 3)
	return jump


def tiaosheng(arr):
	(a, b) = next(([arr[i - 1], arr[i - 1] + 3 * i] for (i, j) in enumerate(arr) if j + 3 * i > 60), [arr[-1], arr[-1] + 3 * len(arr)]) if arr else [0, 0]
	return [a, a + 60 - b][b < 60]


tiaosheng = t = lambda a, e=0: a[0] + e + 3 > 60 and min(a[0], 60 - e) or t(a[1:], e + 3) if a else 60 - e


def tiaosheng(failed_counter):
	time = 0
	for i in range(1, 61):
		if time >= 60:
			return i - 1
		time += 1
		if i in failed_counter:
			time += 3
	return i


def tiaosheng(failed_counter):
	a = [1] * 200
	j = 0
	for i in failed_counter:
		i += 3 * j
		j += 1
		a.insert(i + 1, 0)
		a.insert(i + 1, 0)
		a.insert(i + 1, 0)
	return sum(a[1:61])