Predict the output
import time
tic = time.perf_counter()
print ()
n = int(10)
adj = 0
hyp = 0
i = n**2
adj = i/2-0.5
hyp = i/2+0.5
print("{}, {}, {}".format(n,adj,hyp))
for j in range(2,n):
    if n%j == 0:
        adj = i/2/j-j/2
        hyp = i/2/j+j/2
        print("{}, {}, {}".format(n,adj,hyp))
toc = time.perf_counter()
print(f"\nResults in {toc - tic:0.6f} seconds")

Posted on by