TikTok OA
Anonymous User
1317

Question1: Given 3 integers m,n,r, find the smallest positive integer 'a' such that (m*a)%n = r.

e.g. m = 5, n = 3, r = 1 -> (5*2)%3 = 1, answer = 2.

Question2: Given a list of integers, find the ratio such that all numbers are part of a series and a multiple of the ratio and another number in the series

Arr = [32,32,1250]
Solution:

Series -
32 * 25/4 = 200
200 * 25/4 = 1250
series - 32,200,1250

Answer = 25/4

Comments (2)