0

In 'Code Coach' section, why are there 3 test cases (out of 5) always hidden?

While I was solving the 'Argentina' challenge, my code was successful for the 1-4 test cases, but failed the 5th test case. Since it is hidden I can't understand what is the error or what do I need to change. I have changed my code twice but the result is the same as above. PLEASE HELP!

23rd Mar 2020, 8:16 AM
Adarsh Sah
Adarsh Sah - avatar
3 ответов
+ 3
If all were visible you could "hardcode" every scenario into the code. You could just use some ifs for every test case and print the expected result. Sry, but I can't help you with this. Maybe you can figure out where your code might fail in certain cases.
23rd Mar 2020, 8:26 AM
Aaron Eberhardt
Aaron Eberhardt - avatar
+ 2
Even if you create any real time application then also you can never know what exactly the user will enter. It is expected that your code should run perfectly for all correct inputs. If it's failing at some point means either you overlooked some edge cases or your algorithm is not perfect.
23rd Mar 2020, 9:04 AM
Arsenic
Arsenic - avatar
+ 1
If you share your code with which you are getting trouble, then some one help you by checking it and reply errors, may suggest changes you need... Or else use search bar for similar question and see how they solved...
23rd Mar 2020, 9:05 AM
Jayakrishna 🇮🇳