19
ysenko
6 21 35
2058/ 2195
Yuriy Senko
Last seen 3 months ago
Member for 11 years, 7 months, 12 days
Difficulty Normal
Missions (133) / Solutions (118)
Best solutions / Newest solutions
Initiation
Simple
All the Same
Any
typing.Any
all
List
typing.List
Home
First: super straightforward, no optimizations
Missing Number
zip
pop
min
set
print
Generator
Duplicate Zeros
yield
print
list
for
if
Space for improvement
Morse Decoder
capitalize
strip
join
split
comprehension
First
Non-unique Elements
count
if-comprehension
list-comp
comprehension
First: split-n-join
Backward Each Word
print
join
split
comprehension
str
First
Even the Last
inline-if
sum
First
Three Words
isdigit
inline-if
False
True
split
I hate regexps
First Word
re.compile
compile
f-string
r-string
re
datetime
Days Between
fabs
math.fabs
datetime.datetime
datetime
math
Bruteforce
Pawn Brotherhood
add
ord
set
or
and
Nothing special, just oneliner
Right to Left
tuple
replace
print
join
comprehension
Electronic Station
You had 99 problems, you've used regex now you have 100 problems
Unix Match. Part 1
escape
re.escape
re.compile
compile
r-string
9
divmod, numbers and generators. Must be readable and clear.
Digits Multiplication
mul
operator.mul
divmod
operator
yield
Ugly, do not look
Find Sequence
reversed
yield
any
format
zip
No str just numbers and generators
Digits Multiplication
mul
operator.mul
operator
yield
functools.reduce
Scientific Expedition
First: Make your life harder with re
Combining Celebrity Names
re.Match
Match
IGNORECASE
re.IGNORECASE
re.compile
18
Generators
Conversion from CamelCase
yield
isupper
enumerate
isalpha
lower
19
Find them separately
Goes Right After
find
bool
print
False
and
Just reduce it
Sum by Type
isinstance
functools.reduce
reduce
functools
tuple
First: Counter
Convert and Aggregate
update
collections.Counter
Counter
dict-comp
dict
First: regexp
YAML. Simple Dict
M
re.M
re.compile
compile
yield
Generator
Caps Lock
yield
upper
not
inline-if
join
Sets
Pangram
ascii_lowercase
string.ascii_lowercase
string
set
not
First
Striped Words
filter
upper
enumerate
isalpha
replace
Some itertools
The Hidden Word
itertools.zip_longest
zip_longest
splitlines
reverse
itertools
Simple
Follow Instructions
lambda
for
Everything is better with regex
Conversion into CamelCase
re.compile
compile
strip
r-string
upper
First
Morse Clock
zfill
bin
enumerate
replace
inline-if
First
Time Converter (24h to 12h)
partition
divmod
f-string
inline-if
int
First
The Most Wanted Letter
keys
sort
isalpha
lower
lambda
itertools forever
Bird Language
islice
itertools.islice
collections.deque
deque
iter
First
Letter Queue
case
match-case
insert
values
List
Generator
Cipher Map
compress
itertools.compress
reversed
yield
extend
O'Reilly
sorted()
Determine the Order
cmp_to_key
functools.cmp_to_key
functools
index
set
15
First: exhaustive search
Knapsack Problem
collections.namedtuple
namedtuple
itertools.permutations
permutations
itertools
19
First
Integer Palindrome
reversed
bool
print
False
True
First
Xs and Os Referee
zip
replace
sum
elif
list-comp
Ugly, ugly, ugly
Flatten a List
yield
isinstance
list-comp
list
comprehension
First
Median
sort
inline-if
len
Incinerator
quick and dirty
Hacker Language
class
ascii_letters
string.ascii_letters
staticmethod
decorator
8
Nothing special
Dialogues
class
collections.namedtuple
namedtuple
staticmethod
decorator
9
Decorator
Capital City
class
None
if
Nothing special
Voice TV Control
class
isinstance
ValueError
index
None
First
Army Units
class
raise
capitalize
type
f-string
deepcop() is for lazy people like me :)
Text Editor
class
copy.deepcopy
deepcopy
copy
f-string
First
Every Person is Unique
class
reversed
f-string
datetime.datetime
strip
First, no optimization.
Friends
class
KeyError
setdefault
update
get
First
Building Base
class
format
Mine
First: Recursive
Count Morse
startswith
replace
not
print
int
1
First: simple exponent search
Checking Perfect Power
math.log2
log2
round
math
print
3
Primitive brute force
Fibonacci Poem
yield
extend
break
replace
not
8
Re
Adjacent Letters
re.I
I
re.compile
compile
r-string
Defaultdict
Switch Keys to Values
collections.defaultdict
defaultdict
add
dict
items
A bit faster
The Greatest Common Divisor
raise
reversed
yield
math.sqrt
sqrt
1
First
Replace with Biggest
enumerate
typing.Iterable
Iterable
max
typing
First
Determinant
all
enumerate
inline-if
if-comprehension
elif
Pythonic
Caesar Cipher (encryptor)
translate
ascii_lowercase
string.ascii_lowercase
string
str
2
Simple
Cut Sentence
isalnum
break
not
range
str
First
Binary Count
format
count
Ice Base
Initial approach. Probably can be further optimized.
Factorial Zeros
bool
or
print
while
range
1
1
First: oldschool reduce
Colorful Disks
Ellipsis
reversed
functools.reduce
reduce
functools
2
First
Not in Order
zip
sum
print
sorted
list
3
Map and reduce
Correct Capital
upper
bool
or
inline-if
sum
3
1
Initial implementation. Nothing special, it just works.
Count And Say
enumerate
print
join
and
append
3
First
Counting Tiles
math.ceil
ceil
math.sqrt
sqrt
math
Short and (hopefully) readable
Morse Encoder
lower
join
split
comprehension
Quick and dirty
Long Repeat
enumerate
max
append
else
for
First
Roman Numerals
join
while
append
for
First
The Most Numbers
min
max
inline-if
First
Monkey Typing
re.I
I
re.search
search
re
Alice In Wonderland
Purly functional
Multiplication Table
format
lstrip
lambda
sum
join
First
Transposed Matrix
zip
list
zip
Transposed Matrix
zip
list-comp
list
comprehension
GitHub
Everything is better with re
Cookies
rf-string
re.compile
compile
f-string
get
19
Dirty and straightforward
Painting Wall
class
extend
format
enumerate
pop
Pythonic
The Highest Building
zip
index
max
sum
list
calendar + quick and dirty
The Most Frequent Weekdays
Calendar
calendar.Calendar
calendar.day_name
day_name
calendar
First
The End of Other
endswith
any
comprehension
First
Open Labyrinth
id
class
getattr
object
raise
Dropbox
Second: No intermediate list, just find it on the fly
Common Tail
reversed
zip
None
break
print
4
1
Simple
Simple Hashlib
getattr
hashlib
13
First: simple and straightforward
Common Tail
reversed
zip
None
break
inline-if
First
Three Points Circle
ZeroDivisionError
itertools.permutations
permutations
decorator
math.sqrt
Bruteforce
The Longest Palindromic
reversed
lambda
sorted
join
append
PyCon TW
First
Golden Pyramid
enumerate
max
sum
list-comp
comprehension
Another quick and dirty
Simple Areas
math.pow
mul
operator.mul
raise
pow
First
House Password
re.compile
compile
r-string
re
bool
Storage
Far from optimal but with generator and rules engine :)
Playfair Cipher
cycle
itertools.cycle
class
digits
string.digits
Quick and dirty but should be readable
The Rows of Cakes
Decimal
decimal.Decimal
decimal
itertools.permutations
permutations
First
Skew-symmetric Matrix
zip
enumerate
False
True
list
Brute force
Saw the Stick
enumerate
break
max
not
lambda
1
HubSpot
Aimed for readability not performance
Next Birthday
Dict
typing.Dict
functools.partial
partial
raise
Simple reduce()
Non Empty Lines
functools.reduce
reduce
functools
strip
lambda
First
The Hamming Distance
format
count
Blizzard
Simple and straightforward, no optimization
Connect Stars
itertools.permutations
permutations
itertools.product
product
Tuple
7
First
Stair Steps
insert
max
append
else
len
First
Weekend Counter
datetime.timedelta
timedelta
yield
datetime
sum
First
The Angles of a Triangle
math.floor
floor
math.ceil
ceil
math.degrees
Second
The Angles of a Triangle
math.degrees
degrees
math.acos
acos
round
Nothing special, space for improvement
Min and Max
iter
next
functools.reduce
reduce
functools
1
First
Spaceship Landing Strip
enumerate
break
max
count
inline-if
Rock
O(N) using filter
Sort by Removing
class
filter
None
inline-if
list
5
BruteForce
Most Efficient Cutting
itertools.permutations
permutations
copy
itertools
remove
A bit functional, probably not optimal
Web Log Sessions
rsplit
collections.namedtuple
namedtuple
groupby
itertools.groupby
Fixed a problem with requests in the past
Web Log Sessions
rsplit
collections.namedtuple
namedtuple
groupby
itertools.groupby
Binary search, not optimal
Super Root
inline-if
elif
range
for
if
Codeship
First
The Square Chest
all
continue
sort
while
in
Hermit
First
Colder-Warmer
math.sqrt
sqrt
add
math
enumerate
First
Excel Column Number
reversed
ord
enumerate
print
int
First
Backspace Apply
find
None
inline-if
print
while
First
Ore In The Desert
random.choice
choice
random
math.sqrt
sqrt
Use "functional" style
Mono Captcha
islice
itertools.islice
from_iterable
itertools.from_iterable
itertools.zip_longest
First
Count Consecutive Summers
math.ceil
ceil
math
bool
elif
Watchtower
First
Number Guess
random.choice
choice
random
zip
set
First
Convex Hull
reversed
functools.reduce
reduce
extend
functools
Space for improvement
Rotate Hole
collections.deque
deque
yield
any
collections