You are given with a list of positive integers nums, return whether there exist integers a, b, and c such that a ** 2 + b ** 2 = c ** 2.
1
Expert's answer
2022-05-19T16:41:03-0400
ls=list(map(int,input().split()))
forainrange(len(ls)-2):
forbinrange(a+1,len(ls)-1):
for c inrange(b+1,len(ls)):
if ls[a]**2+ls[b]**2==ls[c]**2:
print([ls[a],ls[b],ls[c]])
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments