Free help with homework

Why join Brainly?

  • ask questions about your assignment
  • get answers with explanations
  • find similar questions

A root is programmed to move forward F meters and backwards again, say B meters, in a straight line. The Robot covers 3 meters in T units of time. On

robot’s path there is a ditch at a distance FD from initial position in forward direction as well as a ditch at a distance BD from initial position in backward direction. This forward and backward movement is performed repeatedly by the Robot.
Your task is to calculate amount of time taken , before the Robot fails in either ditch, if at all it fails in a ditch.
Input Format:
First line contain total number of test cases, denoted by N
Nex N line, contains a tuple containing % values delimited by space
F B T FD BD, where
1. F denotes forward displacement in meters
1. B denotes backward displacement in meters
1. T denotes time taken to cover 1 meter
1. FD denotes robots starting position and the ditch in forward direction
1. BD denotes robots starting position and the ditch in backward direction


For answer https://www.youtube.com/watch?v=q6J8RD35eI8&feature=youtu.be
0 0 0
The Brain
  • The Brain
  • Helper
Not sure about the answer?
Learn more with Brainly!
Having trouble with your homework?
Get free help!
  • 80% of questions are answered in under 10 minutes
  • Answers come with explanations, so that you can learn
  • Answer quality is ensured by our experts