### The problem
How many zeroes are at the **end** of the [factorial](https://en.wikipedia.org/wiki/Factorial) of `10`? 10! = 3628800, i.e. there are `2` zeroes.
16! (or 0x10!) in [hexadecimal](https://en.wikipedia.org/wiki/Hexadecimal) would be 0x130777758000, which has `3` zeroes.
### Scalability
Unfortunately, machine integer numbers has not enough precision for larger values. Floating point numbers drop the tail we need. We can fall back to arbitrary-precision ones - built-ins or from a library, but calculating the full product isn't an efficient way to find just the _tail_ of a factorial. Calculating `100'000!` in compiled language takes around 10 seconds. `1'000'000!` would be around 10 minutes, even using efficient [Karatsuba algorithm](https://en.wikipedia.org/wiki/Karatsuba_algorithm)
### Your task
is to write a function, which will find the number of zeroes at the end of `(number)` factorial in arbitrary [radix](https://en.wikipedia.org/wiki/Radix) = `base` for larger numbers.
- `base` is an integer from 2 to 256
- `number` is an integer from 1 to 1'000'000
**Note** Second argument: number is always declared, passed and displayed as a regular _decimal_ number. If you see a test described as `42! in base 20` it's 4210 **not** 4220 = 8210.
def zeroes (b, n):
  d1={} #for decomposition of base into power of primefactors
  i=2
  while b>1:
    while b%i==0:
      try:
        d1[i]+=1
      except KeyError:
        d1[i]=1
      b//=i
    i+=1
  d2={} #for total powers of the primefactors in the number
  for i in d1:
    s=0
    r=i
    while r<=n:
      s+=n//r
      r*=i
    d2[i]=s
  return min(list(d2[i]//d1[i] for i in d1))

def zeroes (b, n):
  d1={} #for decomposition of base into power of primefactors
  i=2
  while b>1:
    while b%i==0:
      try:
        d1[i]+=1
      except KeyError:
        d1[i]=1
      b//=i
    i+=1
  d2={} #for total powers of the primefactors in the number
  for i in d1:
    s=0
    r=i
    while r<=n:
      s+=n//r
      r*=i
    d2[i]=s
  return min(list(d2[i]//d1[i] for i in d1))
