fork download
  1. a=280
  2. b=250
  3.  
  4. def hcf(a,b):
  5. if a<=b:
  6. g=a
  7. else:
  8. g=b
  9. j=1
  10. t=2
  11.  
  12. while True:
  13.  
  14. if a%t==0 and b%t==0:
  15. j*=t
  16. a=a//t
  17. b=b//t
  18. t=2
  19. else:
  20. t+=1
  21.  
  22. if t==g:
  23. return j
  24.  
  25.  
  26. print(hcf(a,b))
  27.  
  28.  
Success #stdin #stdout 0.03s 9624KB
stdin
Standard input is empty
stdout
10