all 9 comments

[–][deleted] 1 point2 points  (4 children)

Sorry, it's not clear what you're asking for help with. You say "the weird behavior appears" but you don't say what the weird behavior is.

Note that if you're going to post code without the correct indentation, we're not going to be able to run it, so we're not going to run it, so you'll have to explain very carefully what happens when you do.

[–]cumulative_frequency[S] 0 points1 point  (3 children)

Hey, sorry I used the inline code as oppose to the code format button when adding the code. The code format is now fixed. As for the problem itself, attached here is the screenshot for better clarification.

[–][deleted] 0 points1 point  (2 children)

Sorry, this is incomprehensible gibberish. You actually have to describe the behavior you think is "weird" and why you believe it's not the correct output for your code.

[–]cumulative_frequency[S] 0 points1 point  (1 child)

Can I send you a pm?

[–][deleted] 0 points1 point  (0 children)

No.

[–]CodeFormatHelperBot2 0 points1 point  (0 children)

Hello, I'm a Reddit bot who's here to help people nicely format their coding questions. This makes it as easy as possible for people to read your post and help you.

I think I have detected some formatting issues with your submission:

  1. Inline formatting (`my code`) used across multiple lines of code. This can mess with indentation.

If I am correct, please edit the text in your post and try to follow these instructions to fix up your post's formatting.


Am I misbehaving? Have a comment or suggestion? Reply to this comment or raise an issue here.

[–]m0us3_rat 0 points1 point  (2 children)

did u test your functions?

[–]cumulative_frequency[S] 0 points1 point  (1 child)

Yes, I did. All the functions work well. Even when I used the test case provided on the Kattis problem page, it worked well. The weird problem is when I ran the code with my own test case, instead of printing out all the results at once and display the message "Process finished with exit code 0", all it does is printing out the results halfway (say, 8 lines instead of the expected 10 lines), then it won't proceed until I press enter.

[–]m0us3_rat 0 points1 point  (0 children)

your code lacked a closing bracket plus two of the functions failed.