32
martin_b
10 27 43 Leader of the month
5744/ 6195
Last seen 11 months ago
Member for 11 years, 6 months, 16 days
Difficulty Normal
Best reviews / Newest reviews
First-Alex_Burlakov 2
You could use "if number % 15 == 0" instead of "if number % 3 == 0 and number % 5 == 0". More
First-oneq 1 1
You could have used regular expression to get a single line solution. More
First-Tinus_Trotyl 1 1
You could have used if calendar.weekday(year, month, 13) == calendar.FRIDAY instead of the loop over weeks. More
First-zakatov0303 1
Kind of complicated. I think it would be better to catch first the continuous interval when "I see the sun". More
First-marcin31313 1
Good work. Just, I think it is not necessary to sort the factors. As long as you try the divisors from 9 to 2 (which you do), if you construct the result in the reverse order, i.e. result+= str(divisor)+result, you get the correct answer. More
First-Ivan_Nikola 1
Straightforward. Maybe you could create a function instead of duplicating the code that calls f and g and handles compare result and errors. More
collections.Counter, regex-fokusd 1
I would actually regard "I'm" as two words, as it is an abbreviation of "I am". That makes the whole regex stuff obsolete. More
First-MOKICHI 1
I give you one point for the effort, however I think that even in python this should be solved by binary, not string operations. The algorithm is: num1 XOR num2; count nonzero bits in the result of the previous operation. More
First-ylrih 1 1
The code is not very pythonic and the rewrite of morse_letterslist is not clean. However, as long as it works... More
First-shadowpanther 1
The code is generally OK. If I have to express my opinion: 1) I would try to avoid the repeated exponentiation 2) this final format is much more readable: "{0:.{1}f}{2}{3}".format(number, decimals, powers[order], suffix) More
import re-genadiik 1 1
You could use default value for max instead of condition. More
Haversine formule-Lipen 1 1
The conversion to lat/lng is too complicated, you could have used for example regex c = re.findall("(\w+)", s) to get a list of numbers that compose the coordinates. More
Timed with 1.3 *10-6-Wienands 1 2
Clever solution! You would get even faster performance by using set instead of tuple for the corner cases. More
First-saklar13
Rather complicated implementationŠ More
using dict ?-sevaader
There is exclusive or operator x^y, which could be used instead of (x+y)%2 More
First-minto
I used almost the same approach, only with maps instead of lambdas, so obviously good work :-) More
First-blabaster
Some comment explaining the idea would be useful. More
I don't know an efficient way to determine upper case... Had to get clever with what I knew!-arthurheezen
I think it would be better to use ch.isupper() to test uppercase characters. More
Second-Blastus
It is questionable if the object oriented approach makes the code more readable in these small tasks. However, the main algorithm is IMHO a good choice, so overall good work. More
First-Haskkor
Good algorithm. A comment explaining it would be helpful. More
1
2 3