32
fokusd
12 34 40
5761/ 6195
Last seen 2 months ago
Member for 10 years, 1 month, 10 days
Difficulty Normal
Theoretical physicist

Missions (353) / Solutions (335)
Best solutions / Newest solutions
Initiation
textwrap
Split Pairs
textwrap.wrap
wrap
textwrap
inline-if
len
2
8
First
Backward String
str
1
First
Number Length
int
str
len
First
Nearest Value
abs
set
elif
int
for
First
Acceptable Password I
bool
str
len
First
End Zeros
findall
re.findall
r-string
re
not
First
Beginning Zeros
int
str
for
if
First
Easy Unpack
First
Between Markers (simplified)
index
str
First
First Word (simplified)
split
str
First
All the Same
Any
typing.Any
List
typing.List
bool
First
Sum Numbers
isdigit
sum
if-comprehension
split
comprehension
First
Correct Sentence
endswith
upper
else
str
if
divmod max
Max Digit
divmod
max
while
int
First
Count Digits
isdigit
sum
if-comprehension
comprehension
int
First
Replace First
typing.Iterable
Iterable
not
typing
inline-if
First
Remove All Before
dropwhile
itertools.dropwhile
itertools
typing.Iterable
Iterable
collections.Counter
The Most Frequent
collections.Counter
Counter
collections
Home
First
Changing direction
None
print
elif
range
list
10
First
Duplicate Zeros
yield
not
print
list
else
19
First
Backward Each Word
findall
re.findall
r-string
zip
re
First
Sort Array by Element Frequency
index
lambda
count
sorted
First
Sun Angle
round
map
or
and
split
f-strings
Date and Time Converter
f-string
datetime.datetime
datetime
or
inline-if
First
Between Markers
rfind
find
elif
and
str
try index except None
Second Index
ValueError
index
None
except
try
First
Morse Decoder
capitalize
map
lambda
join
list-comp
regex
First Word
re.search
search
re
str
First
Bigger Price
sort
lambda
1
collections.Counter, regex
Popular Words
collections.Counter
Counter
findall
re.findall
dict-comp
1
First
Pawn Brotherhood
intersection
set-comp
comprehension
int
str
First
Days Between
date
datetime.date
datetime
abs
First
Right to Left
replace
join
First
Three Words
isalpha
isdigit
elif
False
True
First
Even the Last
sum
else
len
if
First
Non-unique Elements
count
append
for
if
Electronic Station
First
Unix Match. Part 2
match
re.match
re
replace
bool
7
translate from fnmatch
Unix Match. Part 1
escape
re.escape
translate
match
re.match
9
First
Similar Triangles
Tuple
typing.Tuple
math.acos
acos
math.sqrt
First
Ascending List
typing.Iterable
Iterable
bool
typing
False
First
All Upper II
isupper
bool
str
First
Can You Pass?
add
set
in
False
and
1
First
Find Sequence
groupby
itertools.groupby
numpy.array
array
numpy
1
First
Acceptable Password II
any
isdigit
bool
and
comprehension
1
First
Sort by Extension
List
typing.List
not
typing
lambda
bfs
Remove Brackets
startswith
collections.deque
deque
values
any
2
First
Inside Block
zip
min
max
not
in
First
Words Order
ValueError
index
bool
except
try
First
Acceptable Password IV
any
isdigit
bool
not
and
First
Acceptable Password III
any
isdigit
bool
not
and
First
Acceptable Password V
isdigit
bool
lower
or
in
First
Surjection Strings
zip
replace
bool
str
for
First
Verify Anagrams
upper
isalpha
sorted
if-comprehension
list-comp
First
Brackets
collections.deque
deque
collections
pop
in
First
Boolean Algebra
or
elif
False
and
True
First
Digits Multiplication
int
str
for
if
Scientific Expedition
First
YAML. More Types
strip
dict-comp
dict
items
None
2
First
Convert and Aggregate
OrderedDict
collections.OrderedDict
dict-comp
dict
items
3
First
Caps Lock
upper
continue
isupper
not
lower
12
First
YAML. Simple Dict
strip
dict-comp
dict
items
tuple
13
filter
Sum by Type
Tuple
typing.Tuple
isinstance
filter
typing
17
First
Morse Clock
format
replace
inline-if
list-comp
split
19
1
First
Cipher Map
tuple
zip
map
enumerate
lambda
First
Conversion into CamelCase
capitalize
join
list-comp
split
comprehension
First
Goes Right After
index
bool
or
False
str
First
Time Converter (24h to 12h)
f-string
elif
split
else
int
First
Striped Words
re.compile
compile
upper
continue
re
First
Remove Accents
category
unicodedata.category
normalize
unicodedata.normalize
unicodedata
First
Common Words
map
set
lambda
sorted
join
1
First
The Hidden Word
ljust
enumerate
index
replace
max
collections.Counter
Follow Instructions
collections.Counter
Counter
collections
First
Call to Home
groupby
itertools.groupby
math.ceil
ceil
itertools
one for and append to list
Conversion from CamelCase
isupper
lower
join
append
for
First
Bird Language
continue
replace
lower
join
elif
First
Letter Queue
elif
list-comp
split
comprehension
for
First
Pangram
difference
ascii_uppercase
string.ascii_uppercase
string
upper
First
Absolute Sorting
abs
sorted
First
Secret Message
isupper
isalpha
and
for
if
First
The Most Wanted Letter
filter
isalpha
index
set
max
O'Reilly
First
Integer Palindrome
ascii_letters
string.ascii_letters
digits
string.digits
reverse
3
1
First
The Flat Dictionary
isinstance
dict
items
pop
join
7
First
The Final Stone
heapify
heapq.heapify
heappush
heapq.heappush
heappop
7
Second-DFS
The Flat Dictionary
isinstance
dict
items
inline-if
else
8
First
Chunk
typing.Iterable
Iterable
typing
list-comp
range
11
itertools.permutations
Cipher Crossword
itertools.permutations
permutations
itertools
zip
map
12
First
Median of Three
statistics.median
statistics
median
typing.Iterable
Iterable
12
First
Sort Except Zero
zip
enumerate
typing.Iterable
Iterable
typing
16
First
Majority
bool
not
count
False
True
First
Time Converter (12h to 24h)
f-string
or
in
split
else
total_seconds
Lightbulb Intro
datetime.datetime
datetime
List
typing.List
typing
to str and count max open [(
How Deep
max
in
elif
str
for
First
Replace Last
typing.Iterable
Iterable
not
typing
or
First
Determine the Order
union
collections.defaultdict
defaultdict
extend
is
stack
Reverse Every Ascending
yield
pop
not
or
while
3
functools.cmp_to_key
Frequency Sorting
cmp_to_key
functools.cmp_to_key
functools
count
sorted
1
First
Remove All After
yield
typing.Iterable
break
Iterable
typing
First
Compress List
yield
typing.Iterable
Iterable
not
typing
First
Flatten a List
type
list
if
First
Loading Cargo
enumerate
min
abs
sum
if-comprehension
First
Count Inversions
and
range
len
for
if
Second
Count Inversions
and
range
len
for
if
First
Index Power
math.pow
pow
math
len
if
First
Xs and Os Referee
any
count
or
list-comp
range
First
Median
sorted
else
len
if
Incinerator
First
Geometry Figures
class
object
math.pi
pi
isinstance
3
1
First
3 Chefs
class
f-string
pass
3
First
Army Units
class
raise
f-string
else
if
4
First
The Defenders
class
property
super
decorator
isinstance
5
1
First
Army Battles
class
property
super
decorator
not
5
1
First
Capital City
class
if
6
First
Every Person is Unique
class
math.floor
floor
datetime.strptime
strptime
7
First
Party Invitations
class
TypeError
raise
update
isinstance
15
First
Text Editor
class
copy.deepcopy
deepcopy
copy
f-string
First
Voice TV Control
class
isinstance
in
elif
else
First
Dialogues
class
extend
f-string
continue
replace
First
Microwave Ovens
class
divmod
endswith
f-string
pass
First
Multicolored Lamp
class
len
if
First
Hacker Language
class
ascii_letters
string.ascii_letters
clear
dict-comp
First
The Vampires
class
property
super
decorator
isinstance
First
The Warriors
class
property
super
decorator
not
First
Friends
class
update
remove
set
in
First
Building Base
class
format
Mine
np.dot
Can Balance
dot
numpy.dot
numpy
as
typing.Iterable
3
First
Aggregate by Operation
floordiv
operator.floordiv
contextlib.suppress
suppress
contextlib
3
First
Chess Knight
update
chr
add
ord
set
4
functools.cmp_to_key
Bigger Together
cmp_to_key
functools.cmp_to_key
functools
f-string
map
7
First
Escape
intersection
None
break
not
or
8
recursive
Domino Chain
functools.lru_cache
lru_cache
copy
decorator
functools
16
First
Caesar Cipher (decryptor)
ascii_lowercase
string.ascii_lowercase
string
index
set
20
np.linalg.det
Determinant
numpy.linalg
linalg
numpy
as
round
First
Cut Sentence
rfind
len
if
First
The Greatest Common Divisor
math.gcd
gcd
functools.reduce
reduce
functools
1
First
Currency Style
rsplit
re.split
endswith
findall
re.findall
Second
Currency Style
rsplit
re.split
endswith
findall
re.findall
First
The Einstein Problem-Lite
collections.defaultdict
defaultdict
update
yield
all
First
Color Map
collections.defaultdict
defaultdict
get
add
collections
First
What Is Wrong With This Family?
frozenset
insert
any
remove
enumerate
First
Best Stock
max
lambda
First
Achilles and the Tortoise
First
Caesar Cipher (encryptor)
ascii_lowercase
string.ascii_lowercase
string
index
set
1
First, dfs recursion
Disposable Teleports
copy.deepcopy
deepcopy
collections.defaultdict
defaultdict
copy
First
Binary Count
bin
count
First
Moore Neighbourhood
print
and
len
for
if
Second
Binary Count
f-string
count
First
Fizz Buzz
elif
else
str
if
Ice Base
scipy connected_components, not elementary mission
Count Chains
scipy.spatial.distance.euclidean
euclidean
scipy.sparse.csgraph.connected_component
connected_components
csr_matrix
1
Sort and number difference
Identify Block
None
sorted
in
elif
and
3
regular expr
Find Quotes
finditer
re.finditer
r-string
re
list-comp
1
First
Making Change
float
min
None
range
else
First
Long Repeat
not
range
else
len
for
First
Counting Tiles
math.ceil
ceil
math
and
range
simple O(N^2) bf all subrectangles
Largest Rectangle in a Histogram
min
max
range
comprehension
len
First
Morse Encoder
dict-comp
items
map
lower
lambda
import fractions
Oil Pie
Fraction
fractions.Fraction
fractions
map
abs
string.replace
Reverse Roman Numerals
eval
replace
for
First
Clock Angle
map
abs
split
else
int
First
How to Find Friends
intersection
update
tuple
break
set
First
Feed Pigeons
next
break
sum
elif
range
First
Roman Numerals
replace
First
Monkey Typing
lower
in
for
if
2
First
The Most Numbers
min
max
list
if
Alice In Wonderland
First
Swap Nodes
range
len
for
2
First
When is Friday?
datetime.strptime
strptime
datetime.datetime
datetime
8
recursion
Tree Walker
isinstance
values
dict
or
elif
9
First
Zigzag Array
List
typing.List
typing
append
range
10
First
The Fastest Horse
map
index
min
replace
set
20
First
Middle Characters
else
len
if
simple O(N^2)
Long Non Repeat
set
not
range
len
for
First
Digits Doublets
collections.deque
deque
add
collections
zip
2
defaultdict, BFS
The Shortest Knight's Path
collections.defaultdict
defaultdict
extend
collections
index
First
IP Network: Route Summarization
textwrap.wrap
wrap
textwrap
ljust
rjust
First
Multiplication Table
format
map
or
sum
join
First
Transposed Matrix
range
list
comprehension
len
GitHub
from scipy.sparse.csgraph import dijkstra
The Cheapest Flight
numpy.inf
scipy.sparse.csgraph.dijkstra
dijkstra
inf
scipy
1
2
numpy sol
Evenly Spaced Trees
numpy.add
numpy.append
diff
numpy.diff
numpy.unique
3
First
The Highest Building
tuple
zip
map
index
max
6
First
Barcode Reader
textwrap.wrap
wrap
textwrap
KeyError
enumerate
6
First
Searchlights
math.cos
cos
math.sin
sin
math.pi
6
First, cropped normpath from os.path
Simplify Unix Path
startswith
endswith
r-string
lstrip
replace
17
First
Merge Intervals
extend
tuple
map
set
not
19
First
Cookies
split
for
if
First
Create Intervals
tuple
map
not
sorted
append
Second
Cookies
dict
map
lambda
split
simple brute force
Xs and Os Champion
zip
map
lambda
join
in
dfs
Power Supply
clear
union
collections.deque
deque
collections.defaultdict
One-line (itertools.chain.from_iterable)
Expand Intervals
from_iterable
itertools.from_iterable
chain
itertools.chain
itertools
1
bruteforce
Long Repeat Inside
continue
break
in
range
else
First
The Most Frequent Weekdays
datetime.timedelta
timedelta
date
datetime.date
datetime
First
Shooting Range
math.sqrt
sqrt
round
math
min
datetime, re
Broken Clock
datetime.timedelta
timedelta
datetime.datetime
re.search
search
merge intervals
Painting Wall
sort
max
not
sum
elif
First
Area of a Convex Polygon
abs
range
len
for
First
Solution for Anything
class
True
First
Open Labyrinth
add
continue
pop
set
print
First
The End of Other
endswith
False
True
for
if
Dropbox
First
Text Formatting
center
textwrap.wrap
wrap
textwrap
ljust
1
1
First
Nonogram Row
all
any
List
typing.List
zip
4
numpy dot
Hubspot Amulet
numpy.mod
mod
dot
numpy.dot
numpy
7
1
all_paths
On the same path
typing.Union
Union
union
Tuple
typing.Tuple
9
First
URL Normalization
IGNORECASE
re.IGNORECASE
re.sub
sub
f-string
First
Place Queens
combinations
itertools.combinations
intersection
dict-comp
all
First
Worth of Words
index
max
sum
list
comprehension
First
Simple Hashlib
getattr
hashlib
First
Humpty Dumpty Form
math.atanh
atanh
math.asin
asin
math.pi
First
Three Points Circle
math.sqrt
sqrt
float
format
round
First
The Longest Palindromic
and
range
len
for
if
First
Numbers Factory
map
break
not
sorted
join
First
Speech Module
strip
if
PyCon TW
precalculate dict
Ryerson Letter Grade
items
range
int
str
for
2
sympy
How Much Gold
Rational
sympy.Rational
sympy.linsolve
linsolve
sympy.Matrix
8
First
Double Substring
max
count
if-comprehension
list-comp
range
13
First
Network Attack
eye
numpy.eye
numpy.copy
diag
numpy.diag
13
path = bfs(player, 'E') or bfs(player, '?') or bfs(player, border)
Dark Labyrinth
collections.deque
deque
add
collections
find
groupby, yield
Sum Consecutives
groupby
itertools.groupby
yield
itertools
sum
First
Golden Pyramid
max
list-comp
range
comprehension
else
min [BFS(S->B1)+BFS(E->B2)+BFS(B1->B2), BFS(S,E)]
Express Delivery
collections.deque
deque
next
reversed
yield
First
Robot Sort
f-string
join
append
range
list
stack
Calculate Islands
add
List
typing.List
pop
set
First
Simple Areas
math.pi
pi
math.sqrt
sqrt
math
First
Digit Stack
pop
elif
append
list-comp
split
Second
Digit Stack
contextlib.suppress
suppress
contextlib
with
IndexError
First
House Password
islower
isupper
isalpha
isdigit
or
Second
House Password
islower
isupper
isalpha
isdigit
or
Storage
First
Playfair Cipher
isalnum
add
remove
index
set
11
groupby
Group Equal consecutive
groupby
itertools.groupby
itertools
list-comp
list
1
First
English to Braille Translator
zfill
ascii_uppercase
string.ascii_uppercase
ascii_lowercase
string.ascii_lowercase
haversine formula
Earth Distances
math.atan2
atan2
math.cos
cos
math.sin
First
The Rows of Cakes
combinations
itertools.combinations
extend
all
itertools
First
Restricted Prime
First
Saw the Stick
break
sum
list-comp
range
comprehension
First
Moria Doors
startswith
intersection
re.compile
compile
reversed
First
Word Pattern
format
bin
enumerate
isalpha
isdigit
First
Skew-symmetric Matrix
zip
list-comp
list
comprehension
First
Weak Point
zip
index
min
sum
list-comp
Maya
bfs (restart graph), hard mission
Inertia
clear
collections.deque
deque
Tuple
typing.Tuple
1
HubSpot
First
Triangular Islands
isqrt
math.isqrt
typing.Set
Set
collections.defaultdict
3
brute force without binary search
Workout
List
typing.List
max
typing
sum
9
1
First
Non Empty Lines
filter
map
replace
bool
lambda
15
First
Square Board
cycle
itertools.cycle
next
Tuple
typing.Tuple
16
1
First
City's Happiness
copy.deepcopy
deepcopy
intersection
copy
keys
Greedy
Team Play
List
typing.List
zip
enumerate
typing
First
New Cities
isdisjoint
remove
set
while
if-comprehension
First
Node Disconnected Users
collections.deque
deque
collections.defaultdict
defaultdict
values
regex & decimal form
Repeating Decimals
MULTILINE
re.MULTILINE
re.search
search
r-string
First
Auto Painting
map
min
join
list-comp
range
First
The Hamming Distance
bin
sum
list-comp
list
comprehension
First
Restricted Sum
else
len
if
First
Number Base
ValueError
except
try
int
Blizzard
from scipy.sparse.csgraph import dijkstra again
Useless Flights
full
numpy.full
scipy.sparse.csgraph.dijkstra
dijkstra
scipy
1
scipy.sparse.csgraph
Connect Stars
scipy.spatial.distance.euclidean
euclidean
scipy.sparse.csgraph.minimum_spanning_tr
minimum_spanning_tree
scipy
5
datetime, isoweekday, timedelta
The First Working Day
datetime.timedelta
timedelta
datetime.datetime
datetime
while
7
First
String Conversion
enumerate
min
append
range
else
12
First
Unlucky Days
datetime.timedelta
timedelta
date
datetime.date
datetime
count grid units
Rectangles Union
Tuple
typing.Tuple
add
List
typing.List
1
Fill recursive
Safe Coasts
map
replace
lambda
or
join
backtrack
Sudoku Solver
StopIteration
next
yield
enumerate
except
flood fill with stack
Radiation Search
continue
pop
None
max
not
1
Dyn Prog
Stair Steps
float
max
range
len
for
First
Stressful Subject
endswith
isupper
isalpha
lower
or
1
First
Spaceship Landing Strip
map
min
replace
max
list-comp
First
Min and Max
get
map
index
min
None
First
Weekend Counter
datetime.timedelta
timedelta
datetime
or
range
First
The Angles of a Triangle
math.acos
acos
math.pi
pi
round
Rock
First
Home Coming
collections.Counter
Counter
values
float
items
3
First
Most Efficient Cutting
combinations
itertools.combinations
type
all
itertools
4
First
Crossword Solver
rf-string
copy.deepcopy
deepcopy
union
re.compile
First
Sort by Removing
float
append
list
for
if
BFS
Water Jars
collections.deque
deque
add
items
collections
1
First
Parity Bit Generator
chr
bin
count
join
append
First
CheckSum
isalnum
isnumeric
reversed
all
ord
1
DFS
Berserk Rook
add
remove
index
break
set
First
Super Root
math.log
log
math.sqrt
sqrt
math
Shelter
First
Four To The Floor
arange
numpy.arange
numpy
math.sqrt
sqrt
2
Counter, combinations_with_replacement
Halloween Monsters
combinations_with_replacement
itertools.combinations_with_replacement
collections.Counter
Counter
itertools
3
First
Completely Empty
TypeError
iter
except
try
in
7
1
First
The Nearest Square Number
math.sqrt
sqrt
math
min
abs
7
right hand fill
The Lantern Festival
union
add
index
break
set
First
One line Drawing
class
collections.defaultdict
defaultdict
dict-comp
items
First
AMSCO Cipher
from_iterable
itertools.from_iterable
chain
itertools.chain
iter
First
ADFGVX Cipher
fromkeys
itertools.zip_longest
zip_longest
digits
string.digits
itertools, frozenset dict
Seven Segment
frozenset
combinations
itertools.combinations
extend
itertools
check all subrectangles
Pattern Recognition
break
not
elif
False
True
First
Ghosts Age
math.sqrt
sqrt
tuple
math
break
Codeship
flood fill
Eaten Go Stones
add
pop
set
while
in
3
flood fill, stack
The Territory of Go
add
pop
set
not
while
3
from scipy.sparse.csgraph import shortest_path
Bats Bunker
scipy.spatial.distance.euclidean
euclidean
scipy.sparse.csgraph.shortest_path
shortest_path
full
4
First
Pearls in the Box
functools.lru_cache
lru_cache
decorator
functools
round
1
First
The 88th Puzzle
yield
add
tuple
continue
enumerate
First
Behind 2048
reversed
zip
index
break
not
DP@lru_cache
Probably Dice
functools.lru_cache
lru_cache
decorator
functools
None
Best-first search (heapq)
8 Puzzle
textwrap.wrap
wrap
hash
textwrap
heappush
First
The Square Chest
frozenset
tuple
List
typing.List
map
Hermit
First
Strawberry Fields
math.acos
acos
math.pi
pi
round
2
First
Mono Captcha
argmin
numpy.argmin
numpy.abs
matrix
numpy.matrix
7
brute force and random.choice
Ore In The Desert
random.choice
choice
random
math.sqrt
sqrt
10
1
First
Count Consecutive Summers
math.sqrt
sqrt
math
abs
range
13
Fractions module
Fractions Addition
Fraction
fractions.Fraction
fractions
f-string
else
20
Power of 26
Excel Column Number
reversed
ord
enumerate
sum
comprehension
First
Network Loops
union
collections.deque
deque
collections.defaultdict
defaultdict
sympy_parser
Simplification
parse_expr
sympy.parsing.sympy_parser.parse_expr
sympy
replace
str
First
Colder-Warmer
not
and
len
if
First
Keywords Finder
yield
extend
find
sort
max
First, BFS
Anagrams By Stacks
collections.deque
deque
pass
add
collections
First
The Good Radix
ValueError
continue
break
except
try
Watchtower
check X neighbours regions
Boundary Blocks
fromkeys
update
Tuple
typing.Tuple
add
2
First
Bag of Santa Claus
math.e
e
math
max
or
5
sieve
Bulls and Cows
random.choice
choice
random
itertools.permutations
permutations
7
First
Wall Keeper
map
enumerate
join
and
append
11
scipy.spatial
Convex Hull
scipy.spatial.ConvexHull
ConvexHull
scipy
collections.deque
deque
18
1
First
Bacteria Colonies
itertools.product
product
all
itertools
map
20
First
DNA Common Sequence
update
set
max
or
sorted
First
Compare Functions
None
except
try
not
False
Set sieve
Number Guess
random.sample
sample
random
iter
next
First
Magic Square
from_iterable
itertools.from_iterable
copy.deepcopy
deepcopy
chain
DFS, itertools.permutations
Numbered Triangles
itertools.permutations
permutations
collections.deque
deque
itertools
1
First
Vigenere Cipher
cycle
itertools.cycle
ascii_uppercase
string.ascii_uppercase
re.compile
deque.rotate
Rotate Hole
collections.deque
deque
all
collections
append
First
Funny Addition
Escher
First
Wild Dogs
Fraction
fractions.Fraction
fractions
collections.defaultdict
defaultdict
2
Dyn prog
The Stones
not
False
True
range
else
2
First
Card Game
set-comp
remove
except
try
sorted
2
First
Safe Code
eval
any
continue
replace
except
3
bfs, slow
Graphical Key
collections.deque
deque
collections.defaultdict
defaultdict
yield
3
First
The Tower
combinations
itertools.combinations
intersection
extend
as
3
First
The Secret Room
strip
index
replace
sorted
list-comp
4
First
Treasures
copy.deepcopy
deepcopy
copy
f-string
items
5
First
Compass, Map and Spyglass
abs
max
lambda
elif
range
8
First
Keys and Locks
nonzero
numpy.nonzero
numpy.array_equal
array_equal
numpy.rot90
8
Flood fill
The Buttons
map
not
sorted
if-comprehension
and
16
First
Ground for the House
float
enumerate
min
max
False
18
recursive flood fill
Hypercube
startswith
union
map
set
lower
1
First
The Ship Teams
items
sorted
append
list-comp
comprehension
First
The Stone Wall
tuple
zip
map
index
max