Блог пользователя aritra2zk9l

Автор aritra2zk9l, история, 4 месяца назад, По-английски

You have an array A and a number k. For any pair of numbers x,y from the array A let m be the minimum number such that lcm(x,y)*m is a multiple of k. Find the sum of all such m for all the pairs of A.
Constraint
- size of array(n)<=1e5
- each element of the array is between 1 and 1e9
Note Here you have to sum the m for all n^2 pairs

  • Проголосовать: нравится
  • +1
  • Проголосовать: не нравится