This question is really more about what someone else (who made the test case) think is valid number.
Exactly.. 6e6.5 is not a valid number? I can't see how 6 times 10 to the power of 6.5 has any issue.
I think this question is more like "can you quickly modify your code to satisfy your use case requirement" ..
See the floating point literal definition from the language reference about C++/Java/Python. "-1.", "46.e3" is a valid number, "6e6.5" is not a valid number. If you have any doubt, just test it.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.