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
pratik11: 2016-10-28 11:36:28

For such a simple code ,you are showing my answer as wrong
I also did it on ideone.com ; where i got correct answer

iwillpass: 2016-10-27 21:24:10

My code is fine and returns correct answers, but it says 'wrong answer'... wtf what a shit

himanshukumar: 2016-10-24 20:40:30

please give the some hit for this problem

will_graham: 2016-10-24 18:01:19

try to understand problem perfectly before moving over to input
see output terminates on 42 so no 99

redho_am12: 2016-10-21 10:30:33

Anyone know , how to create "while looping " statement to odd or even in python??

Naveen Reddy Thumma: 2016-10-13 06:34:04

i am getting runtime error even though my code is correct
how to give input parameters in spoj

techkids: 2016-10-10 20:56:42

Not clear. Yes, my code seems logical and it works. But it's a wrong answer. Damn

rishabhs_17: 2016-10-10 13:11:27

question is wrong
we have to exit as soon as we scan 42

rishabhs_17: 2016-10-10 12:59:52

has anyone solved it yet...

rishabhs_17: 2016-10-10 12:59:36

this question is ridiculus
i am not getting it every time i get wrong answer


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