*It seemed a good idea at the time...*

# Why I did it?

After a year on **Codewars** I really needed a holiday...

But not wanting to drift backwards in the honour rankings while I was away, I hatched a cunning plan!

# The Cunning Plan

So I borrowed my friend's "Clone Machine" and cloned myself :-)

Now my clone can do my Kata solutions for me and I can relax!

Brilliant!!



Furthermore, at the end of the day my clone can re-clone herself...

Double brilliant!!



I wonder why I didn't think to do this earlier?



So as I left for the airport I gave my clone instructions to:

* do my Kata solutions for me
* feed the cat
* try to keep the house tidy and not eat too much
* sleep
* clone yourself
* repeat same next day

# The Flaw

Well, how was I supposed to know that cloned DNA is faulty?

:-(

Every time they sleep they wake up with decreased ability - they get slower... they get dumber... they are only able to solve 1 less Kata than they could the previous day.

For example, if they can solve 10 Kata today, then tomorrow they can solve only 9 Kata, then 8, 7, 6... Eventually they can't do much more than sit around all day playing video games.

And (unlike me), when the clone cannot solve any more Kata they are no longer clever enough to operate the clone machine either!

# The Return Home

I suspected something was wrong when I noticed my **Codewars** honour had stopped rising.

I made a hasty return home...

...and found 100s of clones scattered through the house. Mostly they sit harmlessly mumbling to themselves. The largest group have made a kind of nest in my loungeroom where they sit catatonic in front of the PlayStation.

The whole place needs fumigating.

The fridge and pantry are empty.

And I can't find the cat.

# Kata Task

Write a method to predict the final outcome where:

Input:

* `kata-per-day` is the number of Kata I can solve per day

Output:

* ```[number-of-clones, number-of-kata-solved-by-clones]```

Difficulty: EASY
Starter code: def clonewars(n):
	

Solutions:
def clonewars(k):
	return [2 ** max(k - 1, 0), 2 ** (k + 1) - k - 2]


clonewars = lambda n: [-~2 ** n // 2, 2 ** (-~n) - n - 2]


def clonewars(n):
	return [2 ** max(n - 1, 0), 2 ** (n + 1) - (n + 2)]


def clonewars(n):
	if n == 0:
		return [1, 0]
	return [2 ** (n - 1), 2 ** (n + 1) - (n + 1) - 1]


def clonewars(n):
	return [2 ** max(0, n - 1), sum(((n - i) * 2 ** i for i in range(0, n)))]


clonewars = lambda k: [2 ** max(0, k - 1), sum((2 ** max(0, i) * (k - i) for i in range(k)))]


def clonewars(kata):
	return [2 ** (kata - 1), sum((2 ** i * (kata - i) for i in range(kata)))] if kata else [1, 0]


def clonewars(kata_per_day):
	x = max(1, 2 ** (kata_per_day - 1))
	y = 0
	for i in range(0, kata_per_day):
		y += (kata_per_day - i) * 2 ** i
	return [x, y]