57
veky
22 48 64 Leader of the month
44618/ 53887
Last seen 3 hours ago
Member for 11 years, 6 months, 12 days
Difficulty Advanced
We shall not cease from exploration, and the end of all our exploring will be to arrive where we started and know the place for the first time.

Best reviews / Newest reviews
First-mlahor 1
It seems really hard to write an O(n^2) algorithm for this mission, but you've managed that. ;-[ More
while chunk yield chunk-veky
If you're wondering how people wrote that pattern before walrus, check out my other solution. ;-) More
Circumambulating-mpudup 1
Name, don't index! width, height = room for x_center, y_center, radius in sensors: More
Flatten a list-svartmetall 1
You should use the Smart Split (without an argument). That way you don't need `if array else []`. More
pythonic-ibonyun
Here is a Veky's five for you. :-) More
Standard using of Observer Design Pattern-von.Oak
There really is no reason for observers being a list: a set is much more appropriate. More
42-alterGNU
I think you have confused The best number ever with The answer to life, universe and everything. :-P More
Mathematical-StefanPochmann 1
> The list of banned words are as follows: sum import for while reduce Yeah, right. :-P More
I think I used the most stupid way to solve it and it works. -YingyingShen
If you want to see smarter way, look at [my solution](https://py.checkio.org/mission/morse-decoder/publications/veky/python-3/weird-defaults/?ordering=most_voted&filtering=all). ;) More
Counter + sum -> one-liner-DenisKnyazev
Wouldn't [x] * f for x, f in items be nicer than that horrible indexing? :] More
Nested is faster than flat.-veky 1
Of course, the len checking can be done in the same way, at the expense of blowing up the code by a factor of at least 2. But that's even more wrong than this. :-D More
Cloud number... -veky
Are the clouds numbered starting from 0? Or 1? :-D More
Scoped-veky 1
Which digit is used at the end of line 6? :-) More
First-Richard_Lenkiewicz 1
Don't iterate over indices when you can iterate over the list itself. for element in array[0:len(array):2]: sum += element BTW do you really need elif? Can len(array) be less than zero? :-) And while we're at it, a is already 0 in the empty case, you don't need to set it again. :-] More
First clear-sirmax
if...else expression is intentionally written with a syntax that emphasizes the regular case over singular one. So: max(*args) - min(*args) if args else 0 And whenever you compare len of something with 0, slap yourself with a bool. ;-] More
thanks to others.-sirmax
Obvious. :-) Just without those spurious spaces, it would be perfect. :-] More
First solution -sirmax
No need for all those parentheses. Python grammar is sane (mostly). :-] a[n]**n if nMore
First-sirmax
"sum" is a builtin. That should give you a hint. ;-) Also, don't iterate through indices if you can iterate through elements themselves. ;-] And, don't compare len with 0. More
Shortest solution-sirmax
... if array ... And you don't need 0, it's default left edge: sum(array[::2]). More
22 lines (with handmade matrix rotation)-Winandfx
Wow, this surely is _creative_. :-D More