Number of steps to coincide the position on two circles [HELP]

Правка en1, от Nuu, 2018-02-02 00:26:03

Hi guys, Today i sees a apparently easy math problem (but i can't solved):

Two persons walk simutanious around two circles with size A and B with positions [1,2,3,...,A] and [1,2,3,...,B].

Then follow Q querys. Each query give two positions x and y, and asks the number of step for person A arrive on position x and person B arrive on position y (on same time) using O(1).

Thanks guys, i'm very novice in math problems.

Теги #math, #help, #circle, module

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Nuu 2018-02-02 00:26:03 491 Initial revision (published)