+ All Categories
Home > Documents > SPOJ Classical

SPOJ Classical

Date post: 29-Nov-2014
Category:
Upload: azharh36
View: 12 times
Download: 6 times
Share this document with a friend
Popular Tags:
2139
SPOJ Problem Set (classical) 1. Life, the Universe, and Everything Problem code: TEST Your program is to use the brute-force approach in order to find the Answer to Life, the Universe, and Everything. More precisely... rewrite small numbers from input to output. Stop processing input after reading in the number 42. All numbers at input are integers of one or two digits. Example Input: 1 2 88 42 99 Output: 1 2 88 Added by: Michał Małafiejski Date: 2004-05-01 Time limit: 10s Source limit:50000B Languages: All Resource: Douglas Adams, The Hitchhiker’s Guide to the Galaxy 1
Transcript

SPOJ Problem Set (classical)

1. Life, the Universe, and EverythingProblem code: TESTYour program is to use the brute-force approach in order to find the Answer to Life, the Universe, and Everything. More precisely... rewrite small numbers from input to output. Stop processing input after reading in the number 42. All numbers at input are integers of one or two digits.

ExampleInput: 1 2 88 42 99 Output: 1 2 88

Added by: Micha Maafiejski Date: 2004-05-01 Time limit: 10s Source limit:50000B Languages: All Resource: Douglas Adams, The Hitchhikers Guide to the Galaxy

1

SPOJ Problem Set (classical)

2. Prime GeneratorProblem code: PRIME1Peter wants to generate some prime numbers for his cryptosystem. Help him! Your task is to generate all prime numbers between two given numbers!

InputThe input begins with the number t of test cases in a single line (t


Recommended