TDPRIMES - Printing some primes
The problem statement is really simple. You are to write all primes less than 10^8
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
elegantalgo:
2017-04-30 21:19:32
AC in 0.66 seconds.
|
|
coder_hsnake:
2017-02-01 00:12:49
use bitwise sieve |
|
dwij28:
2016-10-15 23:14:16
There is a first time for everything. Like getting a SIGXFSZ error for not reading the question properly and printing all the primes. :D Use bitset in C++.. AC 0.68 seconds :) |
|
akshayvenkat:
2016-07-05 17:36:19
what? same exact code gave TLE yesterday and AC today :O |
|
Shidhu :
2016-03-25 20:54:26
i have took 0.79 !
|
|
Prateek Agarwal:
2016-03-15 20:38:20
How did they do it within 0.1s? mine took 0.44s! Last edit: 2016-03-15 20:42:19 |
|
kicchu_pari_na:
2015-11-02 15:52:05
Um getting RE .. but why ?? I have used Bit wise sieve . |
|
sam_29:
2015-10-25 09:01:51
If you want to apply simple sieve with no optimization then use the Output Given Wisely !!!!!!!!!!!!!!!! |
|
Oasis:
2015-07-08 08:33:04
took 0.64s how to optimize further as there are many ac solutions below 0.5 s Last edit: 2015-07-08 09:00:20 |
|
Avik Sarkar:
2015-07-03 07:29:15
Accepted at 0.46 second |
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 |