TDPRIMES - Printing some primes


The problem statement is really simple. You are to write all primes less than 10^8

Input

There is not input

Output

To make the problem less output related write out only the 1st, 101st, 201st, ... 1st mod 100.

Example

Input:

Output:
2
547
1229
...
99995257
99996931
99998953


hide comments
Parshant garg: 2013-07-27 08:25:35

SIGKILL error... but my code is working on my system.. how to fix this

shiva_hellgeek: 2013-06-22 20:19:13

Learned a lot from this one really a nice problem... :)

Himanshu: 2013-06-13 09:53:56

@atul u are wrong we can store them.......

Atul Kumar Verma: 2013-01-24 17:50:42

@piyush agarwal in c language you can not use such a big array of int type in a function, you should use global array.

Last edit: 2013-06-24 08:22:46
piyush agarwal: 2013-01-16 16:18:32

i m using an array a[100000002] and i m getting Run time error...pls any tell me if we have to use such big array or not??

saket diwakar: 2013-01-13 17:42:40

yeah.....AC:)

Snehasish Roy ;): 2012-08-16 14:41:02

Nice and tricky problem.
A simple trick will do the job :P

StupidGuy: 2012-08-09 10:43:13

haha..9.57
What an escape this is...


Added by:Alfonso² Peterssen
Date:2010-04-06
Time limit:1.325s
Source limit:10000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM32 ASM64 BF CLPS LISP sbcl LISP clisp ERL HASK ICON ICK JS-RHINO LUA NEM NICE OBJC OCAML PHP PIKE PRLG-swi SCALA SCM qobi SCM guile ST SQLITE TCL WHITESPACE
Resource:Thanks to TDuke