57
Awesome Team
Vedran Čačić
https://web.math.hr/~veky
Last seen 23 hours ago
Member for 11 years, 6 months, 7 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.
I see you started mocking finite tasks too. :-D
BTW .format(*divmod(i,60)). And > is not needed.
More
Nice idea. But you could inherit much better type, set.
And why getmembers as external function, instead of just using .names in connected?
More
Instead of stuffing components of date1 (and date2) separately into date initializer, you can splice them at once:
date1 = datetime.date(*date1)
Also, you don't need outer parentheses in last line.
More
i, enumerate, if, duplication in lines 11 and 13... just so you can have one char less at the beginning. It doesn't pay off. You can just slice the result by [1:].
That replaces at the end are probably nicer written using .translate. But not a big deal.
Lines 7 and 8: use divmod.
format is also a
More
Yup, that's good. ;-)
I hope you're aware that you could have written "rue" after T instead of that [0], and still have the same number of characters? :-)
More
You really can't live without checkio function? :-D
But line 9 is wrong. It doesn't matter if args[0] is list or tuple, but whether there _is_ args[1]. You can ask for min((3, 5), (1, 2)).
And a nitpick: lambda x: x isn't mutable, so there is no need for the "None dance" in line 7. :-]
More
When an identifier (like sum here:) is purple, it's subtly trying to tell you something. Namely, Python already has a builtin you can use here.
Also, whenever you see range(len(, you should probably use enumerate.
And, len(array) is unnecessary inside []. array[-1] is the last element.
"if len(ar
More
Wooow! FT in singledigit number of lines. Totally cool. :-)
However, I can't give you more thumbs, since you artificially limit the degree of polynomial. Have you thought about using 1 << expr.count("x").bit_length()? I think it wouldn't slow you down much, and you'd have a general algorithm.
More
Really too complicated, and not working with Pythonic data structures. get_positions is really criminal in that regard.
More
Definitely the most pointless abuse of partial, because it is absolutely total here. :-)
More
Wow, polymorphism. :-) Very precise and nicely documented algorithm.
More
LOL @ line 2. :-) And line 8 is a nice trick, but probably
ints[0] & ~0 << rembit
would be easier to grok.
But seriously... _noone_ but me solved this with Python's library batteries for working with IP? Really sad. :-/
More