+ All Categories

Download - SPOJ Classical

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


Top Related