## **Instructions**

The goal of this kata is two-fold:

1.) You must produce a fibonacci sequence in the form of an array, containing a number of items equal to the input provided.
  
2.) You must replace all numbers in the sequence `divisible by 3` with `Fizz`, those `divisible by 5` with `Buzz`, and those `divisible by both 3 and 5` with `FizzBuzz`.

For the sake of this kata, you can assume all input will be a positive integer.

## **Use Cases**

Return output must be in the form of an array, with the numbers as integers and the replaced numbers (fizzbuzz) as strings.

## **Examples**

Input: 

```python
fibs_fizz_buzz(5)
```
Output:
~~~~
[ 1, 1, 2, 'Fizz', 'Buzz' ]
~~~~

Input:

```python
fibs_fizz_buzz(1)
```
Output:
~~~~
[1]
~~~~

Input:

```python
fibs_fizz_buzz(20)
```
Output:
~~~~
[1,1,2,"Fizz","Buzz",8,13,"Fizz",34,"Buzz",89,"Fizz",233,377,"Buzz","Fizz",1597,2584,4181,"FizzBuzz"]
~~~~

##Good Luck!##

Difficulty: EASY
Tags: Fundamentals

Starter code:
def fibs_fizz_buzz(n):
	

Solutions:
def fibs_fizz_buzz(n):
	(a, b, out) = (0, 1, [])
	for i in range(n):
		s = 'Fizz' * (b % 3 == 0) + 'Buzz' * (b % 5 == 0)
		out.append(s if s else b)
		(a, b) = (b, a + b)
	return out


def fibs_fizz_buzz(n):
	(a, b, f) = (1, 1, [])
	for _ in range(n):
		s = ''
		if not a % 3:
			s += 'Fizz'
		if not a % 5:
			s += 'Buzz'
		f.append(s or a)
		(a, b) = (b, a + b)
	return f


from itertools import islice

def fib():
	(a, b) = (0, 1)
	while True:
		(a, b) = (b, a + b)
		yield a

def fibs_fizz_buzz(n):
	return ['Fizz' * (not i % 3) + 'Buzz' * (not i % 5) or i for i in islice(fib(), n)]


def fibs_fizz_buzz(n):
	fib = [1, 1]
	while len(fib) < n:
		fib.append(sum(fib[-2:]))
	fib = fib[:n]
	fib[3::4] = ['Fizz'] * (n // 4)
	fib[4::5] = ['Buzz'] * (n // 5)
	fib[19::20] = ['FizzBuzz'] * (n // 20)
	return fib


def fibs_fizz_buzz(n):
	(r, a, b) = ([], 0, 1)
	for i in range(n):
		r.append('Fizz' * (not b % 3) + 'Buzz' * (not b % 5) or b)
		(a, b) = (b, a + b)
	return r


def fizz_buzz(n):
	return 'FizzBuzz' if not n % 15 else 'Buzz' if not n % 5 else 'Fizz' if not n % 3 else n

def fibs_generator(n):
	(a, b) = (1, 1)
	for _ in range(n):
		yield a
		(a, b) = (b, a + b)

def fibs_fizz_buzz(n):
	return [fizz_buzz(x) for x in fibs_generator(n)]


def ffb(n):
	(a, b) = (1, 1)
	for i in range(n):
		if a % 15 == 0:
			yield 'FizzBuzz'
		elif a % 3 == 0:
			yield 'Fizz'
		elif a % 5 == 0:
			yield 'Buzz'
		else:
			yield a
		(a, b) = (b, a + b)

def fibs_fizz_buzz(n):
	return list(ffb(n))


def fibs_fizz_buzz(n):
	(a, b, result) = (0, 1, [])
	for i in range(n):
		(a, b) = (b, a + b)
		result.append(a)
	for i in range(len(result)):
		if result[i] % 5 == 0 and result[i] % 3 == 0:
			result[i] = 'FizzBuzz'
		elif result[i] % 5 == 0:
			result[i] = 'Buzz'
		elif result[i] % 3 == 0:
			result[i] = 'Fizz'
	return result


__import__('sys').setrecursionlimit(2600)
from functools import lru_cache
fib = lru_cache(maxsize=None)(lambda n: n if n < 2 else fib(n - 1) + fib(n - 2))
fizz_buzz = lru_cache(maxsize=None)(lambda n: 'FizzBuzz' if not n % 15 else 'Buzz' if not n % 5 else 'Fizz' if not n % 3 else n)
fibs_fizz_buzz = lru_cache(maxsize=None)(lambda n: ([] if n == 1 else fibs_fizz_buzz(n - 1)) + [fizz_buzz(fib(n))])


def fib(n):
	f = [1, 1]
	while len(f) < n:
		f.append(f[-2] + f[-1])
	return f[:n]

def fizz_buzzify(l):
	return ['Fizz' * (n % 3 == 0) + 'Buzz' * (n % 5 == 0) or n for n in l]

def fibs_fizz_buzz(n):
	return fizz_buzzify(fib(n))