# Task
Your task is to find the sum for the range `0 ... m` for all powers from `0 ... n.

# Example

 For `m = 2, n = 3`, the result should be `20`
 
 `0^0+1^0+2^0 + 0^1+1^1+2^1 + 0^2+1^2+2^2 + 0^3+1^3+2^3 = 20`
 
 Note, that no output ever exceeds 2e9.

# Input/Output


 - `[input]` integer m

  `0 <= m <= 50000`


 - `[input]` integer `n`

  `0 <= n <= 9`


 - `[output]` an integer(double in C#)

  The sum value.

Difficulty: introductory

Starter code:

def S2N(m, n):
	

Solutions:
def S2N(m, n):
  return sum(i**j for i in range(m+1) for j in range(n+1))

def S2N(m,n):
    return sum((a**(n+1)-1)//(a-1) if a!=1 else n+1 for a in range(m+1))

def S2N(m, n):
  result = 0
  for x in range(n+1):
      for y in range(m+1):
          result += y**x
  return result

def S2N(m,n):
    return sum(base**pow for pow in range(n+1) for base in range(m+1))

def S2N(m, n):
    return sum(b ** e for b in range(m + 1) for e in range(n + 1))

def S2N(m,n,x=-1,s=0):
    while x < m: 
        p = -1; x+=1
        while p < n: 
            p+=1; s += (x**p)
    return s

def S2N(m, n):
    amounts = (lambda x: x + 1,
               lambda x: x * (x+1)/2,
               lambda x: x * (x+1) * (2*x + 1) / 6,
               lambda x: x**2 * (x+1)**2 / 4,
               lambda x: x * (x+1) * (2*x + 1) * (3*x**2 + 3*x - 1) / 30,
               lambda x: x**2 * (x+1)**2 * (2*x**2 + 2*x - 1) / 12,
               lambda x: x * (x+1) * (2*x + 1) * (3*x**4 + 6*x**3 - 3*x + 1) / 42,
               lambda x: x**2 * (x+1)**2 * (3*x**4 + 6*x**3 - x**2 - 4*x + 2) / 24,
               lambda x: x * (x+1) * (2*x + 1) \
                         * (5*x**6 + 15*x**5 + 5*x**4 - 15*x**3 - x**2 + 9*x - 3) / 90,
               lambda x: x**2 * (x+1)**2 * (x**2 + x - 1) \
                         * (2*x**4 + 4*x**3 - x**2 - 3*x + 3) / 20)
    return sum(amounts[i](m) for i in range(n+1))


def S2N(m, n):
  return sum(sum(i ** j for i in range(m + 1)) for j in range(n + 1))

def S2N(m, n):
    s=0
    for x in range(m+1):
        s+=sum(x**y for y in range(n+1))
    return s

def S2N(m, n):
  result=0
  for i in range(0,m+1):
      for j in range(0,n+1):
          result+=i**j
  return result