Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are an active user of the online education platform - XYZ . You have done till now b submissions out of a have been

You are an active user of the online education platform - XYZ. You have done till now b submissions out of a have been correct. So, the current fraction is a / b.
But you like fraction x / y very much, tell us the no. of minimum submissions you need to do to reach your favorite fraction.
Note
x and y will be co-primes
If not possible then the answer will be -1
Sample Test Cases
2
[[1,2,4,5],
[2,5,1,2]]
Output: [3,1]
write code in

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Rules In Database Systems Third International Workshop Rids 97 Sk Vde Sweden June 26 28 1997 Proceedings Lncs 1312

Authors: Andreas Geppert ,Mikael Berndtsson

1997th Edition

3540635165, 978-3540635161

More Books

Students also viewed these Databases questions

Question

5. Prepare for the role of interviewee

Answered: 1 week ago

Question

6. Secure job interviews and manage them with confidence

Answered: 1 week ago