#
# Copyright (c) Justin Hintz, 2019. All rights reserved.
# Project Euler - Problem 009
#
# Python 3.7.4
#

import time

# Straightforward brute-force search
def ansFunction(n):

    for a in range(1,n-1):
        for b in range(a+1,n):
            c = n - a - b
            if a ** 2 + b ** 2 == c ** 2:
                return a * b * c


startTime = time.time()
print('Answer: ', ansFunction(1000))
endTime = time.time()
print ('Time: ', endTime - startTime)
2c5f68d23afc311264da1bf0379bc176cfd38711
<mask token>


def ansFunction(n):
    for a in range(1, n - 1):
        for b in range(a + 1, n):
            c = n - a - b
            if a ** 2 + b ** 2 == c ** 2:
                return a * b * c


<mask token>

<mask token>


def ansFunction(n):
    for a in range(1, n - 1):
        for b in range(a + 1, n):
            c = n - a - b
            if a ** 2 + b ** 2 == c ** 2:
                return a * b * c


<mask token>
print('Answer: ', ansFunction(1000))
<mask token>
print('Time: ', endTime - startTime)

<mask token>


def ansFunction(n):
    for a in range(1, n - 1):
        for b in range(a + 1, n):
            c = n - a - b
            if a ** 2 + b ** 2 == c ** 2:
                return a * b * c


startTime = time.time()
print('Answer: ', ansFunction(1000))
endTime = time.time()
print('Time: ', endTime - startTime)

import time


def ansFunction(n):
    for a in range(1, n - 1):
        for b in range(a + 1, n):
            c = n - a - b
            if a ** 2 + b ** 2 == c ** 2:
                return a * b * c


startTime = time.time()
print('Answer: ', ansFunction(1000))
endTime = time.time()
print('Time: ', endTime - startTime)

#
# Copyright (c) Justin Hintz, 2019. All rights reserved.
# Project Euler - Problem 009
#
# Python 3.7.4
#

import time

# Straightforward brute-force search
def ansFunction(n):

    for a in range(1,n-1):
        for b in range(a+1,n):
            c = n - a - b
            if a ** 2 + b ** 2 == c ** 2:
                return a * b * c


startTime = time.time()
print('Answer: ', ansFunction(1000))
endTime = time.time()
print ('Time: ', endTime - startTime)