27
blabaster
10 27 36
4095/ 4195
Last seen 2 months ago
Member for 10 years, 3 months, 26 days
Difficulty Normal
Best reviews / Newest reviews
Short (puzzle)-MichalMarsalek 4
Slices are slow :( Shorter and faster with same ideas: checkio=c=lambda d:d.pop()+c(d)if d else 0 More
First-Fedme 4
Chain of comparison looks more pythonic ;) if not dice_number <= target <= dice_number * sides: More
Counter-Sim0000 3 1
Counter() instead defaultdict(int) - it's right! By the way, someone calculate daily bill so: max(t, t * 2 - 100) It looks awfull if replace "t" by "min" :) More
Simulate operation-redteer 2 1
if stackList!=[]: # no! if stackList: # any iterable returns False if empty More
Dynamic programming-Sim0000 2 1
if n1 == 0 or n2 == 0: return n1 + n2 More
First-Sim0000 1 1
Look at my way to keep leading/final sapces and to divide long words: http://www.checkio.org/mission/cowsay/publications/blabaster/python-3/second/ More
ChickenHunt-bunnychai 1 2
To chase the reflection - perfect. Final checks sometimes fails: while True: assert checker(hunt, ('.....X..', '.X.XXX..', '....X...', '.X.XXX..', '..X..X..', More
First-freeman_lex 1
if len(j & i) > 0: # no if j & i: For sequences, (strings, lists, tuples), use the fact that empty sequences are false. /PEP 8/ More
Third-Sim0000 1 1
win = win or s[y][x] == 1024 win |= s[y][x] == 1024 # correct for bool More
literally Counter-veky 1
Replace {-1,0,1} on (-1,0,1) -> speedup 10% with no extra chars ))) More
First-pohmelie 1 1
Hmm, pep8-checker? Unfortunately, it can't help with epsilon = 10 ** (-3) # no! epsilon = 1e-3 More
Simple DP Levenshtein-Lipen 1
>>> False == 0 True >>> True == 1 True so line№16 looks excessive More
First-Sim0000 1 1
> # 21 times was enough to pass all test cases. I say, n1 + n2 times enough ;) rolls with no change (n1, n2) you can discard. More
First-gethappy 1
If you don't need item, don't pop it - del is faster. More
First-freeman_lex 1
elif i == "POP" and len(A): sum+=A.pop() elif len(A): sum+= A[-1] Add a bit of elegance: else: if A: sum += A.pop() if i == "POP" else A[-1] and name var as a "sum" is a bad practice :( More
First-frichard44
... explicit is better than implicit ... It's a Hell: self.connections = set() for con in connections: self.add(con) How to relate self and self.connections? I urge python's guru. More
lru_cache-gyahun_dash 1
gun = tuple( tuple(map(int, s)) for s in ('000000000000000000000000100000000000', '000000000000000000000010100000000000', '000000000000110000001100000000000011', '000000000001000100001100000000000011', '110000000010000010001100000000000000', '11000000001000101100 More
First-Quandray 1
# line №5: grid = list(map(list, crossword)) # lines №№133..138: return tuple(map(''.join, grid)) # It's a python ;) More
around-veky 1
... functions and method calls are expensive (more so than in C or Java) ... /by Guido/ More
First-andrea.manno1 1
((1,2),(2,1))[row%2][col%2] Too heavy for my mind (rown + coln) % 2 + 1 :=)) More
1
2 3