What could be best approach for these type of problems?

Revision en1, by Dazzler, 2017-09-13 21:37:30

There are n(1<=n<=1e5) numbers stored in an array. U have to select a number p and k(2<=k<=3) numbers from array. U will win if gcd of selected k numbers is equal to p. What should be the value of p to maximize the probability of winning. Find p and probability to win if p is selected.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Dazzler 2017-09-13 21:37:30 343 Initial revision (published)