I don't know why the output is different from the test result and my local IDE running result.
In my IntelliJ IDEA and Contribute Testcase, I got the right result:
I don't know where is my error in this moment. Is here anyone could help me? Thanks!
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.