Company: Amazon_14nov

Difficulty: medium

Problem Statement

Problem Description Two robots, named Volt and Turbo, are competing in a race around a circular track. Both begin from the same starting point. The race starts at time T = 0 seconds. Volt starts running at T = Xth second and takes exactly N seconds to complete one lap, while Turbo starts running at T = Yth second and takes exactly M seconds to complete one lap. Your task is to find and return an integer value representing the least time T (in seconds) at which these two robots meet each other again at the starting point. Note Assume N and M to be co-prime positive integers. Co-prime numbers are those numbers that have only 1 as common factor, e.g. 3 and 5 are co-prime numbers. The time is only considered in seconds. A lap is defined as a complete trip around a race track that is repeated several times during a competition. Input Specification input1 : An integer value X, representing the time at which Volt starts the race. input2 : An integer value N, representing the time taken by Vol

More Amazon_14nov OA questionsInterview experiences