57
Awesome Team
Vedran Čačić
https://web.math.hr/~veky
Last seen 16 hours ago
Member for 11 years, 6 months, 23 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.
Those "names" don't really help, if you must break the 80col boundary. sorted\_data is just one char shorter than sorted(data), and semantically completely empty, while "list\_length" is such a bad name that it should be taken outside and shot. :-P
More
Really too complicated, and not working with Pythonic data structures. get_positions is really criminal in that regard.
More
OMG. Ok, you didn't know about math.gcd (nor fractions module...), but not knowing about builtin `abs` function is simply inexcusable. :-P
More
Nice. A few hints:
Adding four characters to line 1 would shorten your line by fourth. :-D
from itertools import combinations_with_replacement as C
Also, despite PEP8 (which you don't care about anyway:)
def checkio(data): return blah
can be written as _real_ one liner :-)
More
Instead of giving my comments a shower of minuses, I think it would be much more productive to [learn some Python](http://www.checkio.org/mission/x-o-referee/publications/veky/python-3/trick-or-treat/). WETness of this code is staggering.
BTW, not everything is horrible up there. Last line is prett
More
LOL. It's possible to be exact and _much_ simpler than this. But this is nice reading. :-D
More
Everything you wrote can be excused, except "Thus".
Seriously, if you're obsessed with milliseconds, you shouldn't write Python at all. You'll just be frustrated. There are much faster languages (where you can be obsessed about nanoseconds;).
More