hi guys please help me out .my code for TEST is running correctly on my machine but when i am submitting it on spoj it gives wrong answer.I am new here on spoj.and also what does wrong answer means does the code compiles and error is in runtime.
please try the above code on your machines and tell if its working
Welcome to the forum! Please read the FAQs on the judge page and the forums.
You don't need to enforce the input constraints. If the problem tells you "All numbers at input are integers of one or two digits", then all numbers ARE one or two digits.
You don't need to store the entire input. You can read an integer, check it, and then output it. If you're testing from the command line, you should redirect stdin from a file (./test
Use code tags when posting code.
Your error: 0 is one digit, and 99 is two digits
1 2 88 99 42
thanks leppyit was submitted successfully
Cheers!
I am getting compile errors for my solution. This is the first one:
/sources/tested.c:1:20: error: iostream: No such file or directory
And this is my code:Edited outI have also tried cstdio. Nothing will work. What am I doing wrong?
I think you are submitting in C, use C++.
I was indeed submitting in C for some reason. It is working perfectly now, thanks.