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
leszekrz_53: 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?

jmathes: 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

owais112: 2022-03-16 14:15:51

prompt method of javascript is not working here why

sravan_2001: 2022-03-09 05:23:35

Good

ravi_2112: 2022-01-19 20:09:35



the code is correct on other complier why not this

Last edit: 2022-01-19 20:10:37
newbie26012004: 2022-01-18 06:12:50

what if the first number of the input is 42, what is the output?

vj_2002: 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

the_trinity: 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?

krati_gupta: 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??

temuulensayshi: 2021-12-26 14:20:26

hi


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

Problem's scores 2 votes

Concept difficulty
Concept difficulty 6%
Implementation difficulty
Implementation difficulty 7%
375 74