fork(1) download
  1. # your code goes here
  2. a=4
  3. b=8
  4. def nwd(a,b):
  5. while a!=b:
  6. if a>b:
  7. a=a-b
  8. elif a<b:
  9. b=b-a
  10. return a
  11. print(nwd(18,24))
  12. print(b,'' '' '',b/nwd(a,b))
  13.  
  14.  
Success #stdin #stdout 0.03s 9588KB
stdin
Standard input is empty
stdout
6
8  2.0