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

Information

If you have some troubles 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:Micha≥ Ma≥afiejski
Date:2004-05-01
Time limit:10s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel Pentium G860 3GHz)
Languages:All
Resource:Douglas Adams, The Hitchhiker's Guide to the Galaxy

hide comments
2014-09-18 21:08:56 Alejandro Menocal
I keep getting NZEC!! and I run it in my command line with java name.java test.txt and it works, anybody knows what is wrong?
2014-09-15 20:37:29 Shaktiman
My 150th problem!!
2014-09-14 16:17:55 Nihar Tadichetty
terminating condition after inputs?

Last edit: 2014-09-14 16:18:17
2014-09-12 15:38:55 hardeep singh mehra
and what is this? "dijikstra's algorithm and dp "

and i'm a c++ coder
2014-09-12 15:37:30 hardeep singh mehra
this was my first question on spoj. but i used a || int n[100] || to enter the numbers, which i think isn't the motive of the question.
can anyone please tell the other coding option which cud have opted for.
2014-09-09 19:04:27 khal drogo
nice application of dijikstra's algorithm and dp!!! Learnt a lot....thank u spoj :-*
2014-09-07 04:10:58 David Rick
Internal Error?! Whats that!?
2014-09-07 03:36:37 David Rick
blablabla
2014-08-31 11:31:48 Shrey
What is the terminating condition for taking input ???
2014-08-30 14:54:23 Adesh Atole
How many inputs to take??
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.