fork(3) download
  1. import math
  2.  
  3. value = 87
  4. sqrt = math.sqrt(87)
  5.  
  6. div = value // sqrt
  7. mod = value % div
  8.  
  9. print(div, mod)
  10.  
  11. # Solução 2:
  12.  
  13. print(divmod(value, int(math.sqrt(value))))
Success #stdin #stdout 0.02s 27680KB
stdin
Standard input is empty
stdout
9.0 6.0
(9, 6)