23
maybe
8 27 38
2953/ 3195
Last seen 2 months ago
Member for 8 years, 9 months, 13 days
Difficulty Normal
Missions (190) / Solutions (132)
Best solutions / Newest solutions
Home
I like reduce
Changing direction
functools.reduce
reduce
functools
None
lambda
8
First
Pawn Brotherhood
itertools.product
product
itertools
set
or
Electronic Station
Recursive Generators
Mathematically Lucky Tickets
operator.truediv
truediv
operator.sub
operator.add
ZeroDivisionError
5
Monte Carlo ;-)
Can You Pass?
randint
random.randint
random
False
and
11
1
First
Words Order
ValueError
index
bool
except
try
12
First
Inside Block
sympy.Polygon
sympy.Point
Polygon
Point
sympy
17
First
Unix Match. Part 2
fullmatch
re.fullmatch
enumerate
re
bool
18
First
Sort by Extension
rindex
List
typing.List
typing
count
20
First
Unix Match. Part 1
fullmatch
re.fullmatch
re
replace
bool
First
Acceptable Password IV
bool
set
or
and
str
First
Ascending List
all
zip
typing.Iterable
Iterable
bool
First
Similar Triangles
Tuple
typing.Tuple
tuple
List
typing.List
First
Digits Multiplication
functools.reduce
reduce
functools
lambda
if-comprehension
2
Scientific Expedition
with explanation
The Hidden Word
ljust
splitlines
next
filter
find
re is appropriate lib
Striped Words
A
re.A
M
re.M
re.I
complex task ;-)
Follow Instructions
complex
sum
comprehension
int
groupby and lambdas
Call to Home
groupby
itertools.groupby
itertools
map
max
First
Sum by Type
Tuple
typing.Tuple
type
functools.reduce
reduce
First
Conversion into CamelCase
capitalize
map
join
split
str
First
Conversion from CamelCase
map
lower
join
str
using try, index
Goes Right After
ValueError
pass
index
bool
except
First
Letter Queue
List
typing.List
typing
inline-if
str
First
Pangram
set
lower
O'Reilly
heapq ...
The Final Stone
abs
not
print
while
list-comp
2
speedy to write or speedy to run?
Lightbulb Start Watching
Optional
typing.Optional
iter
next
datetime.datetime
3
using islice...
Lightbulb Intro
islice
itertools.islice
datetime.datetime
itertools
datetime
15
zip, map and recursion
Determine the Order
fromkeys
dict
zip
map
min
19
1
First
Majority
lambda
count
True
len
works on iterables, not only lists
Median of Three
statistics.median
statistics
median
collections.deque
deque
serve some slices
Replace Last
lambda
generator
Median of Three
statistics.median
statistics
median
collections.deque
deque
First
Sort Except Zero
collections.abc.Iterable
iter
next
filter
collections
First
Median
float
List
typing.List
sort
typing
Incinerator
First
Microwave Ovens
class
divmod
super
format
map
1
First
Geometry Figures
math.tan
tan
AttributeError
classmethod
class
__new__
Capital City
class
object
super
is
None
First
The Lancers
dataclass
dataclasses
dataclasses.dataclass
class
hasattr
First
The Vampires
dataclass
dataclasses
dataclasses.dataclass
class
hasattr
using dataclasses
The Defenders
dataclass
dataclasses
dataclasses.dataclass
class
staticmethod
nothing special
The Healers
dataclass
dataclasses
dataclasses.dataclass
classmethod
class
with ABC
Army Units
ABC
abc.ABC
abc.abstractmethod
abstractmethod
abc
cycle as state context
Multicolored Lamp
cycle
itertools.cycle
class
next
itertools
First
Friends
class
frozenset
chain
itertools.chain
filter
Mine
First
What Is Wrong With This Family?
difference_update
collections.deque
deque
extend
add
6
1
First
Caesar Cipher (decryptor)
translate
collections.defaultdict
defaultdict
dict-comp
collections
7
First
Bigger Together
cmp_to_key
functools.cmp_to_key
functools
map
lambda
13
First
Chess Knight
translate
union
type
chr
ord
19
First
Can Balance
enumerate
typing.Iterable
Iterable
typing
sum
using cube coordinates
Find Enemy
tuple
ord
zip
abs
max
Laplace expansion with recursion
Determinant
sum
list-comp
range
comprehension
len
1
First
Best Stock
reversed
items
zip
max
lambda
First
Cut Sentence
match
re.match
f-string
re
int
First
Moore Neighbourhood
enumerate
abs
max
sum
if-comprehension
are functools and math 3rd party?
The Greatest Common Divisor
math.gcd
gcd
functools.reduce
reduce
functools
First
Binary Count
f-string
count
int
First
Fizz Buzz
lambda
or
join
str
Ice Base
First
Factorial Zeros
print
while
int
1
First
Oil Pie
Fraction
fractions.Fraction
fractions
abs
inline-if
Alice In Wonderland
dictionary of connected numbers
Digits Doublets
heappush
heapq.heappush
heappop
heapq.heappop
heapq
1
direct eval by distance
The Shortest Knight's Path
issuperset
ord
map
lambda
or
12
2
bit fiddling ;-)
IP Network: Route Summarization
and_
operator.and_
operator.or_
or_
operator
17
First
Flood Area
itertools.accumulate
accumulate
itertools
index
typing.Iterable
one pass, with dict of char positions
Long Non Repeat
dict
enumerate
break
in
else
First
Zigzag Array
reversed
List
typing.List
typing
inline-if
bit fiddling avoided by string manipulation
Multiplication Table
translate
f-string
ord
sum
comprehension
1
First
Transposed Matrix
zip
map
lambda
list
1
datetime.date
When is Friday?
date
datetime.date
datetime
map
split
recursive fun
Middle Characters
inline-if
len
singledispatch
Tree Walker
functools.singledispatch
singledispatch
decorator
functools
values
GitHub
reverse and sort words, then the pairs we look for must be neighbours
The End of Other
iter
reversed
any
zip
sorted
11
1
First
The Highest Building
range
len
for
if
First
Cookies
dict
map
lambda
split
Use reduce to absorb the items one by one
Merge Intervals
functools.reduce
reduce
functools
max
not
straight forward analytic geometrics
Shooting Range
round
tuple
zip
lambda
sum
deque and dictionary for precessors
Open Labyrinth
collections.deque
deque
raise
yield
collections
Dropbox
Ugly splitting iterator
Sort Sorted Groups
typing.Iterator
Iterator
chain
itertools.chain
yield
7
follow all entries, use accu and stack
Calculator-I
reverse
eval
findall
re.findall
r-string
12
DFS recursive with reasonable bounds
Sum of Distinct Cubes
StopIteration
next
yield
min
None
17
from wikipedia
Humpty Dumpty Form
math.atanh
atanh
math.asin
asin
math.pi
max() with a custom key function
The Longest Word
enumerate
max
lambda
inline-if
print
reversed, takewhile
Common Tail
itertools.takewhile
takewhile
reversed
itertools
zip
PyCon TW
sweep algo with cuboids
Fused Cubes
bisect.insort
insort
bisect.bisect_left
bisect_left
bisect
4
First
Sum Consecutives
groupby
itertools.groupby
itertools
sum
list-comp
19
dict of formulas
Simple Areas
math.pi
pi
math.sqrt
sqrt
round
1
Map class. Solver looks for nearest incomplete way
Dark Labyrinth
class
collections.deque
deque
raise
property
First
Building Visibility
groupby
itertools.groupby
filter
add
itertools
First
Ryerson Letter Grade
if-comprehension
list-comp
split
comprehension
int
dp bottom up
Golden Pyramid
reversed
enumerate
max
list
for
with DigitStack class
Digit Stack
class
raise
f-string
ValueError
pop
is heapq 3rd party?
Network Attack
discard
heappush
heapq.heappush
heappop
heapq.heappop
Storage
naive implementation
Saw the Stick
collections.deque
deque
next
yield
collections
19
deterrmine col sizes, join lines (join columns to line)
List Beautify
format
zip
max
print
join
usual sieve (some constants and range manually defined)
Restricted Prime
yield
ord
while
False
True
counting lines by point pairs
The Rows of Cakes
Fraction
fractions.Fraction
fractions
combinations
itertools.combinations
straight forward
Moria Doors
findall
re.findall
map
enumerate
re
First
Word Pattern
divmod
isdigit
not
while
False
No loops
Weak Point
zip
enumerate
min
lambda
sum
zip, no indexing
Skew-symmetric Matrix
all
zip
comprehension
1
HubSpot
First
Team Play
operator.sub
operator
sub
List
typing.List
2
Adjacency, then grow connected components
Triangular Islands
collections.deque
deque
set-comp
extend
dict-comp
2
using hecs coordinates
Supply Line
collections.deque
deque
update
yield
extend
connection components after removal of node
City's Happiness
intersection
values
dict
pop
min
with context handler (request was to use 'with')
Number Base
globals
with
class
object
is
1
one by one, with heapq
Workout
heapify
heapq.heapify
heappush
heapq.heappush
heappop
quick&dirty - modified paste&copy from other task
Node Disconnected Users
values
keys
add
dict
pop
broadth first search on adjacent nodes
New Cities
iter
next
keys
add
dict
Blizzard
Same as everybody else, I guess
Permutation Index
math.factorial
factorial
Tuple
typing.Tuple
as
12
wikipedia is my friend...
String Conversion
min
range
else
len
for
13
1
Kruskal algorithm
Connect Stars
class
collections.namedtuple
namedtuple
combinations
itertools.combinations
20
re.search...
Stressful Subject
re.I
I
f-string
re.search
search
1
boring and no exception handling
Min and Max
iter
next
get
None
else
Rock
First
River Crossing
min
None
max
lambda
inline-if
3
using "filter()"
Sort by Removing
filter
not
False
True
list
bisection instead
Super Root
abs
inline-if
while
Shelter
First
The Nearest Square Number
lambda
inline-if
int
11
nothing special
Seven Segment
map
set
lower
sum
list
First
Delivery Drone
itertools.permutations
permutations
itertools
List
typing.List
First
AMSCO Cipher
StopIteration
iter
math.ceil
ceil
next
Codeship
nothing special
Champernowne Word
divmod
print
while
int
str
2
dyn programming (optimization possible: only table segment for target)
Probably Dice
round
min
or
range
for
12
using generators. partitions is done recursively
Unfair Dice
yield
collections.Counter
Counter
collections
min
Standard connected component algo, with is_alive check
Eaten Go Stones
dict-comp
continue
None
not
sum
line sets, ugly precomputed square list
The Square Chest
extend
add
List
typing.List
min
Hermit
First
Strawberry Fields
math.cos
cos
math.sin
sin
math.pi
11
module fractions, quick&dirty formating
Fractions Addition
Fraction
fractions.Fraction
fractions
f-string
inline-if
class Polynom for arithmetics, shunting-yard-algo (split in input parser + stack machine)
Simplification
Number
numbers.Number
numbers
class
collections.deque
1
basics, without re
Unique Email Addresses
rpartition
partition
map
replace
set
xor bitmaps (integers) and count different bits
Mono Captcha
typing.Union
Union
chain
itertools.chain
raise
Watchtower
Graham search with ugly hack for points on line
Convex Hull
insert
round
continue
enumerate
pop
No clever tricks
Numbered Triangles
itertools.permutations
permutations
itertools
continue
set
recursion
Funny Addition
inline-if