18
qria
4 16 29
1698/ 1945
Last seen 7 years ago
Member for 10 years, 9 months, 1 day
Difficulty Normal
Best reviews / Newest reviews
A bit hacky-qria 2 1
Some explanation '@'More
DOX and XOX-veky 1 2
\>>> r = ['012','345','678'] \>>> ["".join(r)[::e]for e in (4, -4)]+r+list(map("".join,zip(*r))) ['048', '840', '012', '345', '678', '036', '147', '258'] \# :'( More
Ugly-Amachua 1 1
I think apostrophe(') in regex "[\w']+" should be excluded since the problem says 'words are separated by whitespaces and punctuation marks'. More
Headache-qria
Essentially same as my first solution, but a bit more compressed sacrificing readability. More
First-bryukh 1
I think this will take a lot of memory since it'll generate the whole list and then measure length. Maybe change this to instead? I think it'll take only O(1) memory. sum(1 for d in range((to_date - from_date).days + 1) if (from_date + timedelta(d)).weekday() in [5, 6]) More
Kanji-z_kro 1
Sorry to be a nitpicker but isn't this just a list of prime numbers in 1~10000? How is this a valid answer? More