TEST - Life, the Universe, and Everything


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

Information

In case of any problems with your code, you can take a look in the forum, you'll find the answer, only for this problem, in various languages.


hide comments
seek_liu: 2015-01-20 03:21:05

It's ok in my PC,why did I get runtime error in spoj?

[code removed -- see note below, "1. Don't post any source code here."]

Last edit: 2013-07-26 03:54:13
zoom: 2015-01-20 03:21:05

Heehee.Cute silly program.

orange: 2015-01-20 03:21:05

LUE

vepagautam: 2015-01-20 03:21:05

The question is not clear!! I understand that stop processing input after reading in the number 42. But what is the cue to stop entering numbers?? Is it that only one number can be entered after inputing 42?

Abhishek: 2015-01-20 03:21:05

what is wrong with it .
i have submitted the correct program.it is running in my pc still here compiler is showing compilation error. And sometimes when i don't get compilation error it shows wrong output when the program runs fine on my pc on turbo c++ compiler.Can anybody help me??

..........: 2015-01-20 03:21:05

can anyone give me more inputs so that i can check my code more precisely

Pankaj Kumar: 2015-01-20 03:21:05

Don't forget return 0 and print next line after every output.
Also select the right compiler before submitting.

sumit: 2015-01-20 03:21:05

my output is coming correctly in my pc and ideone.com compiler.Can anyone please tell me why SPOJ comiler says "Wrong ans"?
Did i able to understand the problem properly???

Last edit: 2013-06-09 12:25:41
vinod kumar: 2015-01-20 03:21:05

what is wrong with it .
i have submitted the correct program.it is running in my pc still here compiler is showing compilation error.could anybody help me why so?

Keerti: 2015-01-20 03:21:05

can't i enter the no. of numbers to be given in this program?


Added by:mima
Date:2004-05-01
Time limit:10s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All
Resource:Douglas Adams, The Hitchhiker's Guide to the Galaxy

Problem's scores 2 votes

Concept difficulty
Concept difficulty 6%
Implementation difficulty
Implementation difficulty 7%
369 74