from fractions import Fraction  
value = 4.2  
print(Fraction(value).limit_denominator()) 

 

相关文章:

  • 2021-05-04
  • 2021-05-25
  • 2021-08-24
  • 2021-06-09
  • 2021-07-30
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-24
相关资源
相似解决方案