fork download
  1. # algorytm euklidesa
  2. a=4
  3. b=6
  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(a,b))
  12. print(a,'' '' '',a/nwd(a,b))
  13. print('-','=','-')
  14. print(b,'' '' '',b/nwd(a,b))
Success #stdin #stdout 0.02s 9640KB
stdin
Standard input is empty
stdout
4
4  1.0
- = -
6  1.5