57
Awesome Team
Vedran Čačić
https://web.math.hr/~veky
Last seen 18 hours ago
Member for 11 years, 6 months, 6 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.
This one made me laugh. :-D
Though, do you really think line 2 does something? How is splitWords eaiser to understand than words.split()?
More
Deeply buried in those comments and asserts, there is a solution that is same as mine. :-D
More
A really head-scratching solution. Nice using of the fact that vertical bound .endswith ("th"), and horizontal .endswith("st"). And raising third dimension to a n&1th power is just... awesome. In a not really positive way. :-D
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
Too complicated and ad hoc. BTW you don't need () around num%3 and num%5.
More
Nice idea, but you really could just break instead of += 'N'. It doesn't really have a purpose. :-)
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
Very nice and straightforward solution. Only a minor question: is this Python 2 or Python 3? In Python 3, you should use // (in fact, //=) instead of / in line 6. Float arithmetic can err in checking the condition of while loop.
More