Submit | All submissions | Best solutions | Back to list |
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
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 |
hide comments
|
||||||||||||||
2020-12-09 05:46:18
1st mod 100 after mean the loop start 0 and then increment 0+100 |
||||||||||||||
2020-10-07 09:52:11
You have to print n_th prime number if (n%100 == 1) . You have to print the prime number itself. Don't print the prime number modulo 100. |
||||||||||||||
2020-10-05 07:29:34
spoj is provides more space than other editors so normal seive goes well here |
||||||||||||||
2020-08-07 08:14:50
weird,normal seive,might not run on tool but gets accepted out here. normal seive works well. happy coding. |
||||||||||||||
2020-07-13 19:28:33
Accepted in one go :D. using only normal sieve. |
||||||||||||||
2020-07-08 10:16:03
Accepted In one go:) Normal Sieve Last edit: 2020-07-08 10:16:19 |
||||||||||||||
2020-05-26 12:02:49
accepted in one go!!! just using a boolean array and normal sieve. |
||||||||||||||
2020-05-11 20:10:23
Normal Boolean array is also passing using normal seive. |
||||||||||||||
2020-05-03 08:26:17
AC on first submit !! using bitwise sieve |
||||||||||||||
2020-04-17 01:28:56
AC in one go :) Use a segmented sieve |