This is exactly the solution I would use in a production environment, and I have no idea why someone would not, other than they are afraid of math and prefer utterly slow solutions which they can understand rather than learning how good solutions work.
Out of curiosity, could someone explain to me, why you wouldn't use this code in a production environment? If you hover over the 'Clever' button, it states that you wouldn't want to put 'clever' code in a production environment. Looking forward to the responses I get.
A regular expression can only match strings or bytes-like objects. Python, unlike JavaScript, does not convert numbers to strings automatically, something you can already see when doing "abc" + 1.
good one!!
it says (and I'm indirectly quoting it), you "usually" don't want to put clever into a coding environment.
That's what I was thinking. It didn't make sense to me either. Thanks for the feedback and insight!
This is exactly the solution I would use in a production environment, and I have no idea why someone would not, other than they are afraid of math and prefer utterly slow solutions which they can understand rather than learning how good solutions work.
Out of curiosity, could someone explain to me, why you wouldn't use this code in a production environment? If you hover over the 'Clever' button, it states that you wouldn't want to put 'clever' code in a production environment. Looking forward to the responses I get.
for me, this was the best, simple, though powerful algorithm of all time (for this code of course!), keep it up champ.
awesome
A regular expression can only match strings or bytes-like objects. Python, unlike JavaScript, does not convert numbers to strings automatically, something you can already see when doing
"abc" + 1
.gauss gang rise up!
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
wow!
Did the exact same thing
按位与&
如果两个二进制位都为1,则结果为1,否则结果为0
Right, thank you for the reminder!
Loading more items...