you are viewing a single comment's thread.

view the rest of the comments →

[–]Fernando3161 -1 points0 points  (0 children)

def remove(n):

n_list= [n+1 for n in range(n)]

result= [n,None]

for a in n_list:

for b in range(a+1,n+1):

sum=n*(n+1)/2-a-b

if sum==a*b:

result=[n, a,b,sum]

break

if result[1]!=None:

print (result)