b. nearest fraction

Правка en1, от FAHIM_py, 2022-08-08 07:03:44

from fractions import Fraction x,y,n=int(input()),int(input()),int(input())

f=Fraction(x,y).limit_denominator(n)

print(str(f.numerator)+"/"+str(f.denominator))

I have submitted the code bt shows runtime error on test 1 can anyone help me please?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский FAHIM_py 2022-08-08 07:03:44 276 Initial revision (published)