0
Hidden testcase
Why in some cases testcases are hidden? Just compare: https://ibb.co/23ZTpTd https://ibb.co/Thqhbmc
4 odpowiedzi
+ 3
Exactly. As far as I know the app only checks whether or not your code gives the correct output for the input in the test cases. It does not check how your code generates that output. So if you knew what the input in each test case is you could just write a simple code that gives out the correct output.
The reason for keeping them hidden even after you passed is probably so you can't tell others what the hidden cases are.
+ 2
It's so you can't cheat by writing code that works just for the test cases.
0
Simon, what do you mean exactly?
Do you mean cheating in this case is instead to write true code (f.e. print (a+b)& but known answer (for example 5.0),it is just write print(5.0)?
What this means in my case - app show me that i reached the test..
What the reason to hide testcase after i reached it?
0
Simon, thanks for your answer.
Yes, you are right. I tested. App just compare output from user's code with expected output, app not compare codes. It's normal, because different peoples can have different ways/codes to solve task..and "cheat code" it is also one of them.
But anyway, as you seen on screenshot or/and you know app never show "expected code", only "expected output" in reached & visible testcases at least.
Ritorical question: why app hide testcase for user, who already successfully passed this test?
Anticheating as variant isn't strong argument, because it's enough to open CODE tab & share it with another user and he/she also will pass this test.