Codeforces will not be available in the period 01:00-05:00 May, 30 (MSK, UTC +3) because of maintenance. ×

Strange problem

Revision en2, by rek, 2017-01-02 19:15:53

Hello, Codeforces!

Recently I stumbled upon a certain problem. Given n pairwise distinct positive integers (let's say all of them are less than or equal to 109), you're ought to find such smallest possible k that these numbers modulo k will still be pairwise distinct.

I'll be thankful if someone suggests a non-naive solution (i.e. w/o explicitly calculating all the pairwise differences) or provides some ideas to start with.

Tags number theory

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English rek 2017-01-02 19:15:53 18 Tiny change: 'find such $k$ that ' -> 'find such smallest possible $k$ that '
en1 English rek 2017-01-02 17:35:35 439 Initial revision for English translation
ru1 Russian rek 2017-01-02 17:34:27 454 Первая редакция (опубликовано)