Write a function that takes a positive integer n, sums all the cubed values from 1 to n, and returns that sum.

Assume that the input n will always be a positive integer.

Examples:

```python
sum_cubes(2)
> 9 
# sum of the cubes of 1 and 2 is 1 + 8
```

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

Solutions:
def sum_cubes(n):
	return sum((i ** 3 for i in range(0, n + 1)))


def sum_cubes(n):
	return (n * (n + 1) / 2) ** 2


def sum_cubes(n):
	return sum((x ** 3 for x in range(n + 1)))


def sum_cubes(n):
	s = 0
	i = 0
	while i <= n:
		s = i ** 3 + s
		i = i + 1
	return s


def sum_cubes(n):
	result = 0
	for i in range(n + 1):
		result = result + i ** 3
	return result


def sum_cubes(n):
	return n * n * (n + 1) * (n + 1) / 4


sum_cubes = lambda n: sum([i ** 3 for i in range(n + 1)])


def sum_cubes(n):
	s = 1
	f = n
	v = 0
	while s != f + 1:
		v += s ** 3
		s += 1
	return v


def sum_cubes(n):
	return sum((v ** 3 for v in range(n + 1)))


import decimal

def sum_cubes(n):
	n = decimal.Decimal(n)
	return n ** 2 * (n + 1) ** 2 / 4


def sum_cubes(n):
	res = 0
	for i in range(1, n + 1):
		res += i ** 3
	return res


def sum_cubes(n):
	result = 0
	for cube in range(n + 1):
		result = result + cube * cube * cube
	return result


def sum_cubes(n):
	my_array = [n ** 3 for n in range(1, n + 1)]
	return sum(my_array)


from math import pow

def sum_cubes(n):
	sum = 0
	for i in range(1, n + 1):
		sum += i ** 3
	return sum


def sum_cubes(n):
	sol = 0
	for i in range(n + 1):
		sol += i ** 3
	return sol


def sum_cubes(n):
	i = 1
	sums = 0
	while i <= n:
		sums = sums + i ** 3
		i += 1
	return sums


def sum_cubes(n):
	return sum((c ** 3 for c in range(1, n + 1)))


def sum_cubes(n):
	return sum((cubed ** 3 for cubed in range(1, n + 1)))


def sum_cubes(n):
	cubes = [i ** 3 for i in range(1, n + 1)]
	return sum(cubes)


def sum_cubes(n):
	s = 0
	for i in range(n + 1):
		s += pow(i, 3)
	return s


def sum_cubes(n):
	tot = 0
	for x in range(1, n + 1):
		tot += x ** 3
	return tot


def sum_cubes(n):
	sum_cube = 0
	for e in range(0, n + 1):
		sum_cube += e ** 3
	return sum_cube


def sum_cubes(n):
	return sum((a ** 3 for a in range(1, n + 1)))


def sum_cubes(n):
	total = 0
	for x in range(n + 1):
		total += x ** 3
	return total


def sum_cubes(n):
	ans = 0
	while n > 0:
		ans += pow(n, 3)
		n -= 1
	return ans


def sum_cubes(n):
	total = 0
	for i in range(1, n + 1):
		i = i ** 3
		total += i
	return total


def sum_cubes(n):
	sum = 0
	for num in range(0, n + 1):
		num = num * num * num
		sum = sum + num
	return sum


def sum_cubes(n):
	c = 0
	for i in range(1, n + 1):
		c = c + i ** 3
	return c


def sum_cubes(n: int):
	return sum((i ** 3 for i in range(n + 1)))


def sum_cubes(n):
	new = 0
	for num in range(1, n + 1):
		new += num ** 3
	return new


def sum_cubes(n):
	summ = 0
	for i in range(n):
		summ += (i + 1) ** 3
	return summ


def sum_cubes(n):
	a = 0
	for x in range(1, n + 1):
		a = x ** 3 + a
	return a


def sum_cubes(n):
	arr = []
	for i in range(1, n + 1):
		arr.append(i)
	x = [i ** 3 for i in arr]
	return sum(x)


def sum_cubes(n):
	result = [0]
	if n == 1:
		return 1
	while n > 0:
		result.append(n ** 3)
		n -= 1
	return sum(result)


def sum_cubes(n):
	sum = 0
	for i in range(1, n + 1):
		sum += i * i * i
	return sum
	n = 6
	print(sum_cubes(n))


def sum_cubes(n):
	return sum(map(lambda a: a ** 3, range(1, n + 1)))


def sum_cubes(n):
	cubes = []
	for num in range(n + 1):
		cubes.append(num ** 3)
	return sum(cubes)


def sum_cubes(n):
	total = 0
	for a in range(1, n + 1):
		total += a ** 3
	return total


def sum_cubes(n):
	answer = 0
	for i in range(n + 1):
		answer += i ** 3
	return answer


def sum_cubes(n):
	s = [i ** 3 for i in range(1, n + 1)]
	return sum(s)


def sum_cubes(n):
	i = 1
	x = 0
	while i < n + 1:
		x = x + i ** 3
		i += 1
	return x


import math

def sum_cubes(n):
	new = []
	for i in range(1, n + 1):
		x = pow(i, 3)
		new.append(x)
		i = i + 1
	return sum(new)


def sum_cubes(n):
	x = 1
	total = 0
	while x <= n:
		total += x ** 3
		x += 1
	return total


def sum_cubes(n):
	return sum([number ** 3 for number in range(1, n + 1)])


def sum_cubes(n):
	suma = 0
	for i in range(1, n + 1):
		suma += i ** 3
	return suma
print(sum_cubes(2))


def sum_cubes(n):
	i = 1
	m = 0
	while i <= n:
		cube = i ** 3
		m = m + cube
		i = i + 1
	return m


def sum_cubes(n):
	return sum([item ** 3 for item in range(1, n + 1, 1)])


def sum_cubes(n):
	count = 0
	for i in range(n + 1):
		count += i ** 3
	return count


def sum_cubes(n):
	(cubes, numbers) = ([], [n])
	for i in range(0, n):
		numbers.append(int(i))
	for num in numbers:
		cubes.append(int(num * num * num))
	return sum(cubes)


def sum_cubes(n):
	counter = 0
	saver = 0
	while counter <= n:
		saver = counter ** 3 + saver
		counter += 1
	return saver


def sum_cubes(n):
	values = range(1, n + 1)
	s = 0
	for value in values:
		cubed = value ** 3
		s += cubed
	return s


def sum_cubes(n):
	if n == 1:
		return 1
	LV = []
	for i in range(n + 1):
		res = i ** 3
		LV.append(res)
	return sum(LV)


def sum_cubes(n):
	y = n + 1
	x = list(range(0, y))
	z = []
	for i in x:
		a = i ** 3
		z.append(a)
	return sum(z)


def sum_cubes(n):
	res = 0
	if n > 0:
		for x in range(1, n + 1):
			res += x ** 3
	return res


def sum_cubes(n):
	a = 0
	for i in range(n + 1):
		a = i * i * i + a
		i += 1
	return a


def sum_cubes(n):
	step1 = list(range(n))
	step2 = [x + 1 for x in step1]
	return sum([x ** 3 for x in step2])


def sum_cubes(n):
	g = 0
	for i in range(n + 1):
		i **= 3
		g += i
	return g


def sum_cubes(n):
	ans = 0
	for x in range(1, n + 1):
		ans += x ** 3
	return ans


def sum_cubes(n):
	cubes = 0
	for i in range(1, n + 1):
		cubes += i * i * i
	return cubes


def sum_cubes(n):
	sum = 0
	for number in range(1, n + 1):
		cube = number ** 3
		sum += cube
	return sum


def sum_cubes(n):
	return sum((nb ** 3 for nb in range(1, n + 1)))


def sum_cubes(n):
	numlist = []
	while n >= 0:
		numlist.append(n)
		n = n - 1
	return sum(numlist) ** 2


def sum_cubes(n):
	exponentiated = 0
	for count in range(1, n):
		exponentiated += count ** 3
	return exponentiated + n ** 3


from math import *

def sum_cubes(n):
	total = 0
	for i in range(n + 1):
		total += int(pow(i, 3))
	return total


def sum_cubes(n):
	cubed = 0
	for i in range(n + 1):
		cubed += i * i * i
		i += 1
	return cubed


def sum_cubes(n):
	sums = 0
	for num in range(0, n + 1):
		sums += num ** 3
	return sums


def sum_cubes(n):
	sums = []
	for item in range(n):
		item += 1
		cube = pow(item, 3)
		sums.append(cube)
	return sum(sums)


def sum_cubes(n):
	res = 1
	while n > 1:
		res += n * n * n
		n -= 1
	return res


def sum_cubes(n):
	cubes = map(lambda x: x ** 3, range(1, n + 1))
	return sum(cubes)


def sum_cubes(a):
	return sum([k ** 3 for k in range(1, a + 1)])


def sum_cubes(a):
	summ = 0
	for k in range(1, a + 1):
		summ += k ** 3
	return summ


def sum_cubes(n):
	return (n ** 2 + n) ** 2 // 4