zlacker

[parent] [thread] 1 comments
1. crummy+(OP)[view] [source] 2019-11-11 00:51:40
That's mentioned in the article, at the bottom, under the topic "Alternative, invalid solution":

> As a result, solutions using strings are disallowed on problem sets and quizzes until they are taught.

replies(1): >>lvncel+wx
2. lvncel+wx[view] [source] 2019-11-11 09:46:44
>>crummy+(OP)
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]