TDPRIMES - Printing some primes
The problem statement is really simple. You are to write all primes less than 108.
Input
There is no 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
|
!!!!!:
2010-10-03 11:54:13
lolzzz!!! in ma system it's giving ans in 2.4s and tle here.. |
|
Vimal poonia:
2010-07-16 16:26:56
my accepted program on 7.6 going tle nw
|
|
Abel Nieto Rodriguez:
2010-06-04 14:46:14
@Alfonso2
|
|
sudipto das:
2010-05-21 11:22:27
Modular arithmatics can help to make Sieve of Eratosthenes more fast & get AC from TLE............ |
|
যোবায়ের:
2010-04-17 07:05:32
Damn! I didn't know that unsigned is slow :( |
|
numerix:
2011-02-08 12:46:28
Could you please open it for Python.
|
|
jean caffou:
2010-04-17 07:05:32
I am testing on a very limited virtual machine...
|
|
numerix:
2010-04-17 07:05:32
There's nothing strange about that. SPOJ uses very slow machines. |
|
jean caffou:
2010-04-17 07:05:32
My program also executes in 5secs, but I get TLE on SPOJ (time limit here is 10s) strange.. |
|
pankaj:
2010-04-17 07:05:32
after lots of optimization it went to 2.8 now i don't know how to optimize more
|
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 guile SCM qobi ST SQLITE TCL WHITESPACE |
Resource: | Thanks to TDuke |