1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
from random import shuffle, randrange
from collections import defaultdict

print "init..."

max = 10000001

numbers = range( 1, max )
numbers.append( randrange( 1, max ) )
shuffle( numbers )

d = defaultdict( int )

print "searching..."

for i in numbers:
    d[i] += 1
    if d[i] > 1:
        print i, d[i]