Sphere Online Judge

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:3s
Source limit:50000B
Languages:All except: TECS
Resource:Douglas Adams, The Hitchhiker's Guide to the Galaxy

hide comments
2009-10-04 21:55:39 [Trichromatic] XilinX
About comments of problems: if a comment is (completely) unrelated to that problem, or it's just the source code, I'll delete it by hand.
2009-09-15 18:56:42 Miorel Palii
Java coders, remember to call your class Main.

See sample program in our forum.

Last edit: 2009-11-17 15:21:16
2009-09-15 18:56:42 [Trichromatic] XilinX
The third one. A search in the forum can usually give you much useful information.

Last edit: 2009-03-31 06:04:50
2009-09-15 18:56:42 [Trichromatic] XilinX
Another one. When you try to solve a problem with a large number of users who has got Accepted, and you get a non-accepted verdict, please check your program carefully. Don't doubt with the judge test data in a hurry.
2009-09-15 18:56:42 [Trichromatic] XilinX
To new users of SPOJ: a program should read data from stdin(in C/C++, please use scanf/cin), and write to stdout(in C/C++, please use printf/cout). Please follow the input/output format strictly, or your program will not be judged as Accepted.
SPOJ System © 2010 Sphere Research Labs. All Rights Reserved.