Help in a GCD problem.

Revision en1, by pk842, 2019-05-05 07:04:53

Given an array of integers $$$(A[i] <= 10^5)$$$. We have to find number of unordered pairs (i, j) such that their GCD is greater than B.

All value <= $$$10^5$$$

Can someone give me a general idea how to approach such kinds of problems? Because this type of question appears frequently in programming contests and every time I devote much time solving this but failed each time :(

Tags gcd, #dp, #help

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English pk842 2019-05-05 07:04:53 400 Initial revision (published)