+ 5
This code works, but it doesn't fulfill the requirements to get accepted in the Military Time code coach challenge.
Does anybody have an idea? I just don,t see the mistake... https://code.sololearn.com/cSZ7KJxCEhoJ/?ref=app
4 Respostas
+ 1
Ex:
It showing wrong results for sample input 1:00 AM,
Your output 1:00, required output 01:00
(for single hr input, append 0)
For input 1:00 Pm,
Yours 1:00, but required output 13:00
+ 1
Know i know my mistake... thought the input would be 01:00 PM but it is 1:00PM. 🤦♂️
+ 1
I fixed the issue and i changed the code. Now using a hashmap. But the last condition is still not met. Didnt find it as i was debugging. It shows the time in the format 00:00 now 🤷♂️
https://code.sololearn.com/cSRE5r064z9n/?ref=app
+ 1
Ok the third version finally worked. I have to keep things more simple. Thanks everybody. Thread closed... 😊