fork download
  1. def nwd(a, b):
  2. while b != 0:
  3. pom = b
  4. b = a % b
  5. a = pom
  6. return a
  7. def nww(a, b):
  8. pom = nwd(a, b)
  9. return a * b // pom
  10.  
  11. def flamastry(x, y, z):
  12. pom1 = nww(x,y)
  13. pom2 = nww(pom1,z)
  14. return pom2 // z
  15. print(flamastry(6,8,10))
  16. print(flamastry(39,26,52))
Success #stdin #stdout 0.1s 14112KB
stdin
Standard input is empty
stdout
12
3