DIV2 - Divisors 2

Let N be a positive integer and d(N) be the number of positive divisors of N including 1 and N. Your task is to compute all N in [1,10^6] for which d(N)>3 and if M divides N then d(M) divides d(N) too.

Input

None.

Output

To make the problem less output related write out only every 108-th of them, one per line.

Example

Output:
267
511
753
...
999579
999781
999977

Added by:czylabsonasa
Date:2005-05-24
Time limit:1s
Source limit:3333B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All
Resource:Folklore

hide comments
2016-09-04 23:05:38 Anuj Arora
Similar to DIV ....just pattern observation in the output
2016-08-11 19:15:22 Sunny
I tried running a loop from square root of a number to its half, counting 2 for each factor and storing the factors and so on as well as storing d(N) for all values starting from 1 to 1000000. I am getting a TLE.
2016-07-14 14:15:23 Piyush Kumar
For people confused about M, M divides N, so M is a divisor of N.
2016-06-08 00:06:49
can anybody explain what is M?

Last edit: 2016-06-08 00:07:14
2015-12-12 21:24:12
What is M?
2015-01-23 18:04:00 Sayak Haldar
this problem is awesome...:)
2014-11-14 17:52:49 Francky
Note for archive : this problem was on Pyramid before this day, now on cube. EB don't have hands on those changes.
2014-09-14 14:17:24 Bharath Reddy
Clever problem. Easy to implement...
2011-09-08 20:24:25 যোবায়ের
M divides N ==> N % M = 0
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.