TEST00 - Prime numbers
Ahmed wants to List all the prime numbers from 0 to n ; He will do this for N times
Input
The input file first line contains the number of cases N.
then followed by N lines.
each line contains the number ni where i is the trial's number; Ahmed wants to calculate all primes till it
Output
A file of N lines ; line i contains all the prime numbers till ni
Example Number 1:
Input:
2
5
7
Output:
2 3 5
2 3 5 7Example Number 2:
Input:
3
Conditions:
5
1
7
Output:
2 3 5
2 3 5 7
N [Number ofTrials] is between 0 and 100
0< ni <10000
hide comments
|
Mitch Schwartz:
2013-12-24 10:48:31
Haha, what a "trick". Problem hidden. |
|
ওয়াসী (Wasi):
2013-06-18 17:25:08
@Piotr got your trick. Its cool! ;)
|
|
Mitch Schwartz:
2013-05-25 16:01:04
Thanks to Łukasz Kuszner, the 0 scores at the top have been fixed with rejudge. I don't know what weakness in the test data or judging allows score of 35, but there seems to be no harm keeping this problem visible in tutorial section, for now anyway. Last edit: 2013-05-25 16:14:56 |
|
Piotr KÄ…kol:
2010-08-26 08:51:08
Still not fixed? :-/
|
|
Chandra Sekar:
2010-08-13 19:51:29
Pretty cool trick :D |
|
Piotr KÄ…kol:
2010-08-13 19:47:24
I agree in 100%. Or at least test should be changed. |
|
Piotr KÄ…kol:
2010-08-12 16:53:57
Oh, come on. You can do better. ;-P Look at my code. ;-)
|
Added by: | Abdelrhman Mohamed Ibrahim Abotaleb |
Date: | 2010-08-09 |
Time limit: | 0.100s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ADA95 ASM32 ASM64 BASH BF CPP CPP14 CLPS LISP sbcl LISP clisp D ERL FORTRAN HASK ICON ICK JS-RHINO LUA NEM NICE OBJC OCAML PAS-GPC PAS-FPC PERL PHP PIKE PRLG-swi PYTHON RUBY SCALA SCM guile SCM qobi ST SQLITE TCL WHITESPACE |
Resource: | Abdelrhman Abotaleb [ECTL labs 2010] |