aritra2zk9l's blog

By aritra2zk9l, history, 2 hours ago, In English

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

  • Vote: I like it
  • +3
  • Vote: I do not like it