Anil, The problem is that you've put a line into your program that says "Stop executing and tell the executing process that there was an error." I understand that you weren't aware that that's what the line does, but that's what "return 1;" in your main() function means. Some possible changes you could make:
- Delete that line. - Change it to return 0; I understand that it's frustrating to have your code, which looks fine on your computer, fail online. My experience so far is that this doesn't happen often, so hopefully with this out of the way you'll have more luck! Bartholomew On Sat, Apr 21, 2018 at 3:48 PM Anil M <[email protected]> wrote: > Google code jam is testing my coding skills or my common knowledge? > > On Sunday, April 22, 2018, Anil M <[email protected]> wrote: > >> The program that returns one runs pretty well on my computer, i don’t >> rewrite my main function every time , I just copy paste, I submit the code >> I get a runtime error, why would I think it is because of returning one? >> I’m wasted so much time thinking something is wrong with my code. I don’t >> have even have the knowledge of returning one. Does google code jam >> guidelines say that the program shouldn’t return one? It is not requirement >> on my computer. > > >> >> On Sunday, April 22, 2018, Xiongqi ZHANG <[email protected]> wrote: >> >>> Not meant to be harsh, isn't this a common knowledge that exit code is >>> used to determine whether a child process finished w/ or w/o any error? >>> >>> >>> https://stackoverflow.com/questions/9426045/difference-between-exit0-and-exit1-in-python >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Google Code Jam" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To post to this group, send email to [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/google-code/082fa56b-8409-4787-ac0e-2edb04729ec6%40googlegroups.com >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- > You received this message because you are subscribed to the Google Groups > "Google Code Jam" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/google-code/CAB-p_fh3YvUz7Bjf7_o7crHDHHymZrahV0GAcgsSAmcr--NT2w%40mail.gmail.com > <https://groups.google.com/d/msgid/google-code/CAB-p_fh3YvUz7Bjf7_o7crHDHHymZrahV0GAcgsSAmcr--NT2w%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Google Code Jam" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/google-code/CAHaiWHMXhKxxipJ1F-s%2BsTCrauZJMRzFTKxz34SKYHbm72WzEA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
