Jan-10-2022, 03:16 PM
Hello,
Here's a basic question.
But i only get 1?
Thank you
Here's a basic question.
a = 154 b = 42 d = 0 f = 0 for i in range(1,a): d = round(a / i) print(d) for s in range(1,b): f = round(b / s) print("f",f) if (d==f): print("D",f)Common GCD is 14 but print "D" return only 1. I would of expect at least to list in output 14 , 8, 7, 6, 5, 4, 3 ,2 , 1 and then filter largest one 14.
But i only get 1?
Thank you