Exemplo n.º 1
0
def assertSolution(n, expected, debug=True):
    actual = find_integer_solutions(n)

    if debug:
        print("f(" + str(n) + ") = " + str(actual))

    if not check_equality_order_independent(expected, actual):
        print("FAIL")
        print("n = " + str(n))
        print("expected: " + str(expected))
        print("actual: " + str(actual))
        print("")
Exemplo n.º 2
0

from cubeint import find_integer_solutions


print('')
print('n^3 = a^3 + b^3 + c^3')
print('')

print('n' + ': ' + '[a, b, c]')
for n in range(31):
	result = find_integer_solutions(n)
	print(str(n) + ': ' + str(result))