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.


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

hide comments
2022-04-12 23:15:07
Really poor definition of this task cousing a lot of confusion.
What is input? Stdin, console, file?
Same regarding output.
Shown example: is it 5 lines input or what?
2022-03-18 22:55:59
It needs to be clearer how to accept the input. If it's stdin, you need to say so
2022-03-16 14:15:51
prompt method of javascript is not working here why
2022-03-09 05:23:35
Good
2022-01-19 20:09:35


the code is correct on other complier why not this

Last edit: 2022-01-19 20:10:37
2022-01-18 06:12:50
what if the first number of the input is 42, what is the output?
2022-01-09 19:03:07
I am unable to understand the working here
secondly, version of python is not up to date and hence giving some errors
2022-01-06 05:43:36
My code in my IDE gives the correct answer but here it is showing that my answer is wrong. Lmao Wtf?
2021-12-28 12:31:34
it says it should accept input of one or two digit integer but my code is also accepting integer of 3 digit but you accepted my code , why??
2021-12-26 14:20:26
hi
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.