Anthony_Jakson's blog

By Anthony_Jakson, history, 4 years ago, In English

A problem came in my mind few days ago. And now I am very willing to know the ans. I tried but couldn't solve it.

You are given n numbers 1<= n <= (10^5) you have to maximize the gcd of those numbers.

You can do one operation : Replace a with a-1 (a is a number)

**Note: ** It is not a part of any ongoing contest.

Can any one please tell me any solution that will work in this time constraint. Thanks in advance.

I am very sorry guys. You have to maximize .. not minimize

Full text and comments »

  • Vote: I like it
  • -4
  • Vote: I do not like it