Page 3 of 3
Posted: Mon Jun 05, 2006 8:15 am
got AC in 1.822. how to reduce it?

i did:

modified sieve ran upto 2000000

then recursion to get depth[]

then O(1) output

Mahbub

### Use backtracking to generate all unique prime factorization

Posted: Sun Sep 17, 2006 9:16 pm
shanto86 wrote:got AC in 1.822. how to reduce it?

i did:

modified sieve ran upto 2000000

then recursion to get depth[]

then O(1) output

Mahbub
I have generated all prime factorization and generated value for the phi(n) at the same time.

You can get the prime factorization and number of relative primes of all numbers 2 to 2000000 in linear complexity when you have all primes less than 2000000 in your hand.

I got ACC in time 0.619 Sec(And got myself at rank 1 today).

### Re: 10990 - Another New Function

Posted: Thu May 10, 2012 5:38 pm
to avoid TLE pass your code with tis i/o

input:

Code: Select all

``````2000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
25463 312335
2 2000000
2 2000000
2 2000000
4 73
5 29
6 329
1230 3728
23529 55444
50000 60000
90888 90888
2 100000
100001 200000
1000000 2000000
1999999 2000000
2000000 2000000
2 2000000
182 298149
16871 199290
34 28711
6163 6163
7777 7777
12345 12345
1725777 1725777
2 2000000
``````
output:

Code: Select all

``````4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
4280287
33829803
33829803
33829803
325
94
2063
24762
424814
137488
13
1325890
1495090
17760797
38
19
33829803
4349639
2623043
336858
11
12
13
18
33829803
``````