+ 4
Not able to pass tests 3 & 5 in Military Challenge
I have tested all edge cases that I can think of ensuring correct output appears for AM & PM configurations. Also ensured that single digits are prefixed by 0 & that the output is in string format. All my testing on Sololearn does not show the error. Could some-one help find the bug please, so I may learn from this. https://code.sololearn.com/cp03KfPY0Tn4/?ref=app https://code.sololearn.com/cp03KfPY0Tn4/?ref=app
5 Answers
+ 3
NotAPythonNinja
đ€Łđđ€Łđ
So easy!
I was sure I had 0, didn't even think I had typed O.
Good pick up, well done & many thanks
+ 3
Atul [Inactive]
That's ok buddy, you must have used the code that was repaired through the assistance of NotAPythonNinja
+ 2
NotAPythonNinja
That's true, but I am concatenating a string to a string by that stage of the code.
string res;
"0" + res
I will double check, & please correct me if I am wrong.
+ 2
@Rik It's working fine. Sorry I tested your code without your permission. And it resulted me with xps
+ 2
Rik Wittkopp I solved it earlier by java so I knew the error ;) . But that 0 and O seemed to trick my eyes đ