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
|
raajokiaa_rtiu:
2020-05-03 08:26:17
AC on first submit !! using bitwise sieve |
|
atharvazzz:
2020-04-17 01:28:56
AC in one go :)
|
|
dhruv_2701:
2020-04-02 14:32:02
what is 1st mod 100 after ... ,
|
|
krishp:
2019-12-26 03:00:40
using bitwise sieve in python is annoying as hell |
|
akshadv48:
2019-11-14 07:56:34
@elegantalgo
|
|
zarif_2002:
2019-11-03 16:01:36
Normal sieve passes. How? I used only boolian mark array and it passes!!!! |
|
shanto09:
2019-10-18 14:53:19
Accepted in one go!!
|
|
dr_beast:
2019-10-01 13:24:54
Are we here to take mod of others too, or just for the 1st one |
|
yaseenmollik:
2019-10-01 04:47:13
Done using bitwise sieve! |
|
aayush_b1999:
2019-07-17 19:04:44
bool array is the way to go with normal sieve |
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 |