Fibonacci numbers are generated by setting F0 = 0, F1 = 1, and then using the formula:
# Fn = Fn-1 + Fn-2
Your task is to efficiently calculate the **n**th element in the Fibonacci sequence and then count the occurrence of each digit in the number. Return a list of integer pairs sorted in **descending** order.
10 ≤ n ≤ 100000
## Examples
```
f(10) = 55  # returns [(2, 5)], as there are two occurances of digit 5
f(10000)    # returns:
  [(254, 3),
   (228, 2),
   (217, 6),
   (217, 0),
   (202, 5),
   (199, 1),
   (198, 7),
   (197, 8),
   (194, 4),
   (184, 9)]
```
If two integers have the same count, sort them in descending order.
Your algorithm must be efficient.
~~~if:javascript
Solving this Kata in Javascript requires the use of the bignumber.js library. I have included starter code to assist you with using the library. Thanks to `kazk` for assisting with the translation.
~~~
def fib_digits(n):
    numCount = [[0,0], [0,1], [0,2], [0,3], [0,4], [0,5], [0,6], [0,7], [0,8], [0,9]] # 2d array of the amounts of each number
    a,b = 1,1
    for i in range(n-1): # calculate the fibonacci number of the entered digit
      a,b = b,a+b
    fib_list = list(str(a)) # create a list of the numbers (in string form), one number per item
    i = 0
    while i < len(fib_list):
      numCount[int(fib_list[i])][0] += 1 # if number is x, the number of x's is incremented
      i+=1
    i = 0
    while i < len(numCount):
      numCount[i] = tuple(numCount[i]) # convert each list item to tuple
      if numCount[i][0] == 0:
        numCount.pop(i) # if there aren't any of a specific number, remove it
      else:
        i+=1
    return sorted(numCount, key=lambda x: (x[0], x[1]), reverse=True) # return the sorted list
def fib_digits(n):
    numCount = [[0,0], [0,1], [0,2], [0,3], [0,4], [0,5], [0,6], [0,7], [0,8], [0,9]] # 2d array of the amounts of each number
    a,b = 1,1
    for i in range(n-1): # calculate the fibonacci number of the entered digit
      a,b = b,a+b
    fib_list = list(str(a)) # create a list of the numbers (in string form), one number per item
    i = 0
    while i < len(fib_list):
      numCount[int(fib_list[i])][0] += 1 # if number is x, the number of x's is incremented
      i+=1
    i = 0
    while i < len(numCount):
      numCount[i] = tuple(numCount[i]) # convert each list item to tuple
      if numCount[i][0] == 0:
        numCount.pop(i) # if there aren't any of a specific number, remove it
      else:
        i+=1
    return sorted(numCount, key=lambda x: (x[0], x[1]), reverse=True) # return the sorted list