zlacker

[parent] [thread] 0 comments
1. lvncel+(OP)[view] [source] 2019-11-11 09:46:44
Also as a result, even the proposed solution is wrong for certain cases, takes longer, and doesn't convey what it's achieving as elegantly as `len(str(n))`. Because the length of the string representation is - exactly - what is being asked here.

I get that sometimes the simplest solution to a problem is not teaching the right stuff, but in almost all cases that is a fault in the problem, not the solution.

[go to top]