Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Given two long integers, min and max, find and print a common fraction, d d , such that min d max and | n d
Given two long integers, min and max, find and print a common fraction,
such that min max and is minimal recall that
~~ If
there are several fractions having minimal distance to choose the one with the
smallest denominator.
Input Format
Two spaceseparated long integers describing the respective values of min and
max.
Constraints
minmax
Output Format
Print your answer in the form where is the numerator of the fraction
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started