26
macfreek
10 25 47
3381/ 3945
Last seen 1 year ago
Member for 11 years, 5 months, 5 days
Difficulty Normal
Physicist by education. Network specialist by profession. Amateur programmer by hobby.

Missions (137) / Solutions (112)
Best solutions / Newest solutions
Home
Use itertools.pairwise & list concatenation
Changing direction
itertools.pairwise
pairwise
itertools
inline-if
print
6
strptime & string formatting
Date and Time Converter
datetime.strptime
strptime
datetime.datetime
format
datetime
regexp
Three Words
re.search
search
r-string
re
bool
First
Even the Last
IndexError
except
try
sum
list-comp
First
Non-unique Elements
add
enumerate
set
or
in
Electronic Station
Filter, sort, compare
Verify Anagrams
lower
sorted
if-comprehension
list-comp
comprehension
1
S*L*O*W
Mathematically Lucky Tickets
ZeroDivisionError
eval
itertools.product
product
operator
2
Simple stack
Brackets
IndexError
pop
except
try
in
1
List comprehension + reduce
Digits Multiplication
functools.reduce
reduce
functools
lambda
if-comprehension
Loopy Loop
Find Sequence
zip
min
None
inline-if
print
Scientific Expedition
2 big pros, 3 smaller cons
I Love Python!
Use set.intersection
Pangram
intersection
set
lower
len
Remove Mn chars after NFD normalization
Remove Accents
category
unicodedata.category
normalize
unicodedata.normalize
unicodedata
First
Morse Clock
translate
divmod
format
bin
list-comp
First
Absolute Sorting
abs
sorted
Set intersection
Common Words
set
sorted
join
split
list
zip
The Hidden Word
itertools.zip_longest
zip_longest
splitlines
ValueError
pass
First
Striped Words
findall
re.findall
r-string
upper
pop
First
The Most Wanted Letter
collections.Counter
Counter
collections
lower
sorted
O'Reilly
Match sequence patterns (incomplete)
Cipher Crossword
KeyError
chain
itertools.chain
yield
extend
Very Fast!
Determine the Order
StopIteration
groupby
itertools.groupby
chain
itertools.chain
7
First
Flatten a List
TypeError
chain
itertools.chain
itertools
except
Exit checks
Parse Array
raise
is
ValueError
pass
continue
1
First
Xs and Os Referee
tuple
zip
list-comp
range
comprehension
First
Median
sorted
else
len
if
Fixed
Loading Cargo
yield
continue
None
abs
break
16
2
First
Loading Cargo
combinations
itertools.combinations
itertools
abs
break
Mine
First
What Is Wrong With This Family?
difference_update
KeyError
update
yield
dict-comp
2
Short
Binary Count
bin
count
First
Fizz Buzz
elif
else
str
if
Depth first search with recursion
Disposable Teleports
yield
remove
enumerate
set
if-comprehension
1
Ice Base
Plain
Morse Encoder
get
upper
join
list-comp
comprehension
Use of Mark Pilgrims roman library
Reverse Roman Numerals
VERBOSE
re.VERBOSE
class
Exception
raise
First
Largest Rectangle in a Histogram
set
max
else
for
if
18
First
The Most Numbers
ValueError
min
except
try
max
1
All Math
Feed Pigeons
math.ceil
ceil
math
max
else
3
5
Loop colomns in a quarter
Counting Tiles
math.ceil
ceil
math.sqrt
sqrt
math
2
1
Mark Pilgrim's library
Roman Numerals
VERBOSE
re.VERBOSE
class
Exception
raise
8
Alice In Wonderland
Use ipaddress module
IP Network: Route Summarization
IPv4Network
ip_network
ipaddress.IPv4Network
ipaddress.ip_network
ipaddress
5
BFS with mutations
Digits Doublets
class
StopIteration
Exception
raise
yield
Breadth First Search
The Shortest Knight's Path
continue
pop
index
None
while
First
Transposed Matrix
list-comp
range
comprehension
len
if
GitHub
py-rangeset library
Painting Wall
issuperset
hash
classmethod
class
issubset
First
The End of Other
endswith
enumerate
sorted
False
True
Simple math
Area of a Convex Polygon
abs
range
len
for
2
2
Re-useable code
Open Labyrinth
__init__
collections.__init__
UserList
collections.UserList
class
First
Solution for Anything
class
True
Dropbox
4-line solution with difflib
The Longest Palindromic
SequenceMatcher
difflib.SequenceMatcher
difflib
None
len
Using difflib
The Longest Palindromic
SequenceMatcher
difflib.SequenceMatcher
difflib
None
len
2
1
First
Three Points Circle
eval
endswith
format
round
str
17
2
Clear & fast
Numbers Factory
while
elif
int
str
for
First
Friendly Number
abs
break
while
int
len
15
First
Speech Module
Exception
raise
divmod
print
join
PyCon TW
Clear, but lengthy
Unfair Districts
Enum
enum.Enum
difference_update
enum
class
8
First
Double Substring
SequenceMatcher
difflib.SequenceMatcher
difflib
None
max
2
First
Network Attack
math.inf
inf
math
min
max
Three formulas
Simple Areas
raise
math.pi
pi
math
elif
A*
Express Delivery
__init__
collections.__init__
UserList
collections.UserList
class
Straightforward
Building Visibility
add
sort
enumerate
break
set
20
First
Golden Pyramid
enumerate
max
list-comp
comprehension
len
Simple addition
How Much Gold
Fraction
fractions.Fraction
fractions
extend
items
Find, expand and mark islands
Calculate Islands
update
pass
add
continue
IndexError
First
House Password
digits
string.digits
ascii_uppercase
string.ascii_uppercase
ascii_lowercase
1
Storage
With notes
Weak Point
zip
index
min
sum
list-comp
Coordinate transform
Square Spiral
AssertionError
raise
divmod
math.sqrt
sqrt
5
zip_longest
Word Pattern
ascii_letters
string.ascii_letters
itertools.zip_longest
zip_longest
digits
3
All 128 states
Haunted House
KeyError
divmod
yield
pass
format
9
Poor BFS
Haunted House
yield
insert
format
remove
continue
Dijkstra algorithm
Digging a Canal
__init__
collections.__init__
UserList
collections.UserList
class
17
Generic: works for all primes
Restricted Prime
StopIteration
raise
yield
is
pop
6
Too complicated
The Rows of Cakes
fractions.gcd
class
gcd
KeyError
fractions
First
Skew-symmetric Matrix
False
True
range
len
for
HubSpot
Simple: just go through it in order, twice
Auto Painting
min
join
list-comp
range
comprehension
bin, zip, map, xor, sum
The Hamming Distance
operator.xor
xor
itertools.zip_longest
zip_longest
operator
1
First
Number Base
ValueError
except
try
int
Recursive
Restricted Sum
else
len
if
Blizzard
Improved, with exceptions
Min and Max
StopIteration
TypeError
raise
iter
next
With exceptions too
Min and Max
StopIteration
TypeError
raise
iter
next
9
7 strategies
Sudoku Solver
UserList
collections.UserList
repr
class
hasattr
1
5
Backslash magic
Palindromic Palindrome
lambda
5
2
First
The Angles of a Triangle
math.acos
acos
math.pi
pi
round
First
Weekend Counter
int
Second, fixed
Stair Steps
max
for
Region detection
Radiation Search
continue
pop
None
while
False
9
First
Spaceship Landing Strip
enumerate
break
in
False
list-comp
Rock
Variant of Newton approximation, works for almost any input number
Super Root
math.exp
exp
math.log
log
math.ceil
Lamber W function, with poor accuracy method
Super Root
math.exp
exp
math.log
log
math
BFS
Water Jars
class
StopIteration
Exception
raise
yield
15
First
CheckSum
reversed
ord
continue
not
lower
Shelter
Overengineered
Completely Empty
id
TypeError
iter
yield
enumerate
Eerie and unreadable
Ghosts Age
next
yield
enumerate
while
True
Codeship
Fast, clear
Pearls in the Box
collections.Counter
Counter
values
dict-comp
items
9
Suurballe algorithm
Snake Lite
__init__
collections.__init__
UserList
collections.UserList
class
10
2
Another BFS
8 Puzzle
class
StopIteration
Exception
chain
itertools.chain
19
Dijkstra/A*
Bats Bunker
__init__
collections.__init__
UserList
collections.UserList
class
Four strategies
Minesweeper
randint
random.randint
mul
operator.mul
random
13
Brute force
The Square Chest
raise
ValueError
or
inline-if
False
Hermit
First
Colder-Warmer
random.choice
choice
random
itertools.product
product
3
First
Keywords Finder
find
continue
sort
pop
break
Generic BFS puzzle
Anagrams By Stacks
class
StopIteration
Exception
raise
yield
Assumes 4-bit wide chars
Mono Captcha
zip
inline-if
sorted
append
list-comp
Dumb brute force
Ore In The Desert
abs
if-comprehension
False
True
list-comp
Brute force
The Good Radix
ValueError
pass
except
try
range
Recursive two-tuple iterator
Reverse Engineer
randint
random.randint
ZeroDivisionError
random
Fraction
5
Watchtower
Wikibooks is my friend
Convex Hull
reversed
enumerate
pop
set
sorted
11
Brute force, smart order
Numbered Triangles
chain
itertools.chain
combinations
itertools.combinations
yield
1
6
Solve it in your sleep()
Funny Addition
perf_counter
time.perf_counter
sleep
time.sleep
time
1
Dumb brute force
Bulls and Cows
itertools.permutations
permutations
filter
itertools
zip
20
1
Brute force
Number Guess
filter
zip
break
lambda
range