21
Максим Эмбаухов
Last seen 1 month ago
Member for 2 years, 5 months, 4 days
Difficulty Normal
Nice, I thought of a comprehension with join but could not make it work. Using compress() instead makes it real easy.
More
It was quite shocking to find out IEEE 754 recommends 0 ** 0 to be 1.
More
Pretty short action mapping but I wonder if you can get rid of nested checking somehow...
So far the best I though of was:
def checkio(number: int) -> str:
s = list(filter(lambda x: not number %x[0], FB.items())) + [(0, str(number))]
return s[0][1]
But perhaps you could do bet
More
How's that kind of type annotation even legal? It does nothing apparently anyway.
More
int() may be omitted
2*(not n%5)+(not n%3) should also work, but might be version dependent..,
More