Submit | All submissions | Best solutions | Back to list |
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
|
||||||||||||||
2015-01-20 03:21:05 vepagautam
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? |
||||||||||||||
2015-01-20 03:21:05 Abhishek
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 |
||||||||||||||
2015-01-20 03:21:05 Pankaj Kumar
Don't forget return 0 and print next line after every output. Also select the right compiler before submitting. |
||||||||||||||
2015-01-20 03:21:05 sumit
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 |
||||||||||||||
2015-01-20 03:21:05 vinod kumar
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? |
||||||||||||||
2015-01-20 03:21:05 Keerti
can't i enter the no. of numbers to be given in this program? |
||||||||||||||
2015-01-20 03:21:05 secret
I am getting wrong answer in spoj though the same code is giving right answer in ideone.Please help me out. |
||||||||||||||
2015-01-20 03:21:05 Tobias B.
Haha it's so stupid, you have to print a newline after each number. And don't forget to return 0; |
||||||||||||||
2015-01-20 03:21:05 Rafi Ahmad
why my program show run time error bt its gives correct ourput? can anyone help me? |