29
nakanohito_piyo
11 32 53
4610/ 4695
Last seen 10 months ago
Member for 10 years, 2 months, 26 days
Difficulty Normal
Ph.D. student of computer science/Japanese translation committer in CheckIO. Feel free to comment!

Missions (228) / Solutions (255)
Best solutions / Newest solutions
Initiation
np.******
All the Same
numpy.unique
unique
numpy
Any
typing.Any
1
4
O(N) - without .count
The Most Frequent
get
dict
for
if
11
3
uniq
All the Same
Any
typing.Any
List
typing.List
bool
13
1
Just an import is enough
Multiply (Intro)
as
2
One-liner
Split Pairs
list-comp
range
comprehension
len
simple
The Most Frequent
max
lambda
count
Straight-forward indexing
Easy Unpack
simple
First Word (simplified)
lambda
split
First
Between Markers (simplified)
find
lambda
if-then + slicing
Correct Sentence
upper
str
if
Home
First
Non-unique Elements
count
if-comprehension
list-comp
comprehension
2
13
sort with key function
Sort Array by Element Frequency
index
lambda
count
sorted
5
1
Short
Even the Last
lambda
sum
len
7
First
Morse Decoder
upper
replace
join
list-comp
split
More datetime module
Sun Angle
datetime.timedelta
timedelta
datetime.datetime
round
datetime
1
Simple one-liner
Right to Left
replace
join
First
Even the Last
sum
if-comprehension
list-comp
range
comprehension
datetime.str{p,f}time
Date and Time Converter
datetime.strptime
strptime
as
datetime.datetime
format
Regexp-split & count: pythonic?
Popular Words
re.split
dict-comp
re
lower
count
1
Index-slicing
Between Markers
ValueError
index
except
try
str
Simple sort-and-slice
Bigger Price
lambda
sorted
True
where are guarded?
Pawn Brotherhood
chr
ord
in
append
for
2
basic math
Sun Angle
round
or
and
split
else
2
str.index with start parameter
Second Index
ValueError
index
None
except
try
Split-filter
First Word
re.split
r-string
re
if-comprehension
list-comp
Simple
Days Between
as
date
datetime.date
datetime
abs
First
Three Words
all
isalpha
False
True
split
Electronic Station
One-liner, use sort
Verify Anagrams
replace
lower
lambda
sorted
9
Switch by dict
Boolean Algebra
Strip-check-loop
Unix Match. Part 2
match
re.match
r-string
find
re
First
Can You Pass?
continue
or
elif
False
and
Very simple implementation
Boolean Algebra
not
or
elif
and
else
2
First
Digits Multiplication
max
else
int
if
Escape & Regex
Unix Match. Part 1
escape
re.escape
match
re.match
re
First
Surjection Strings
is
pass
get
dict
None
unwize solution?
Find Sequence
pass
except
try
or
False
First
Verify Anagrams
remove
replace
lower
in
False
straight-forward
Ascending List
typing.Iterable
Iterable
bool
typing
False
Rydia's answer
Brackets
Exception
pop
except
try
in
Scientific Expedition
Simple but redundant
Morse Clock
format
replace
join
append
split
4
4
Unicode normalize
Remove Accents
category
unicodedata.category
normalize
unicodedata.normalize
unicodedata
13
1
One-liner
Conversion from CamelCase
isupper
lower
join
comprehension
18
Looooong one liner function
Striped Words
re.split
all
upper
re
lambda
1
Invert array
The Hidden Word
zip
map
index
replace
max
split-camelized-join
Conversion into CamelCase
chr
ord
map
lambda
join
lambda
Follow Instructions
lambda
count
datetime.datetime.str{p|f}time
Time Converter (24h to 12h)
datetime.strptime
strptime
datetime.datetime
datetime
replace
First
Common Words
min
max
count
sorted
join
First
Letter Queue
print
in
elif
for
if
One-liner
Pangram
chr
all
ord
lower
in
string.capwords
Conversion into CamelCase
capwords
string.capwords
string
replace
lambda
1
First
Caps Lock
upper
not
join
elif
False
Simple
Call to Home
math.ceil
ceil
math
inline-if
sum
clear and one-liner
Secret Message
isupper
join
if-comprehension
list-comp
comprehension
First impression
Bird Language
isspace
while
elif
else
len
First
Cipher Map
zip
lambda
join
if-comprehension
list-comp
1
honest imprement
Striped Words
re.split
pass
all
upper
re
First
The Most Wanted Letter
chr
ord
isalpha
index
max
Very Simple
Absolute Sorting
abs
lambda
sorted
1
set algebra
Common Words
set-comp
set
sorted
join
if-comprehension
O'Reilly
np.median - second
Median of Three
numpy.median
median
numpy
typing.Iterable
Iterable
6
np.median
Median of Three
numpy.median
median
numpy
typing.Iterable
Iterable
8
numpy.median - Cheating?
Median
numpy.median
median
numpy
as
20
Golfed
Index Power
lambda
len
1
one-liner without if-else
Median
lambda
sorted
int
len
double key
Frequency Sorting
lambda
count
sorted
1
recursion-based DFS
How Deep
isinstance
tuple
max
for
if
Clear str{p|f}time
Time Converter (12h to 24h)
datetime.strptime
strptime
datetime.datetime
datetime
replace
Cut down from the first; then brute-force
Determine the Order
itertools.permutations
permutations
is
all
itertools
One-liner
Flatten a List
isinstance
lambda
inline-if
list
Intuitive solution
Index Power
IndexError
except
try
Simple solution
Count Inversions
and
range
len
for
if
itertools.combinations -- a cheat?
Count Inversions
combinations
itertools.combinations
as
itertools
sum
First
Xs and Os Referee
range
for
if
full-search
Loading Cargo
min
abs
sum
list-comp
comprehension
Rydia's ans
Median
sorted
else
int
len
if
Incinerator
Remove redundant implementation in human and robot
Dialogues
class
re.sub
sub
pass
re
4
Greedy decrypt
Hacker Language
ABCMeta
abc.ABCMeta
abc.abstractmethod
abstractmethod
abc
4
First
Text Editor
class
append
else
if
5
First
Party Invitations
class
add
remove
set
for
7
datetime, format
Every Person is Unique
class
datetime.strptime
strptime
capitalize
datetime.datetime
12
Loop Index
Multicolored Lamp
class
len
14
First
The Weapons
class
hasattr
super
is
min
Least inheritance by abstract class soldier, use classname
Army Units
class
lower
join
1
First
Geometry Figures
class
math.pi
pi
math.sqrt
sqrt
First
The Warlords
class
hasattr
super
isinstance
is
Concise
Building Base
class
str
1
Index state
Voice TV Control
class
isinstance
inline-if
in
else
1
First
Microwave Ovens
class
raise
super
ValueError
format
Metaclass Singleton
Capital City
class
super
type
if
Minimal implementation
3 Chefs
class
super
format
First
Friends
class
update
remove
set
print
First
Building Base
class
str
Mine
momentum by inner product
Can Balance
dot
numpy.dot
numpy
as
typing.Iterable
4
Char-wise decrypto + map
Caesar Cipher (decryptor)
ascii_lowercase
string.ascii_lowercase
string
map
index
5
Short and maybe scary?
Fizz Buzz
lambda
str
6
2
Char-wise encrypto + map
Caesar Cipher (encryptor)
ascii_lowercase
string.ascii_lowercase
string
map
index
6
reduce gcd args
The Greatest Common Divisor
math.gcd
gcd
functools.reduce
reduce
functools
7
Short
Achilles and the Tortoise
lambda
17
Third
Binary Count
bin
lambda
count
str
Basic depth-first search
Domino Chain
enumerate
replace
elif
split
list
First impression
Moore Neighbourhood
pass
IndexError
except
try
or
2
Count the number of fathers
What Is Wrong With This Family?
extend
dict-comp
any
add
set
Recursive jump with record
Chess Knight
isinstance
extend
chr
ord
set
Loop jump
Chess Knight
extend
chr
ord
set
sorted
My sort_with_comparator
Bigger Together
insert
map
lambda
join
while
One Line
Binary Count
if-comprehension
list-comp
range
comprehension
len
character-wise decrypto
Caesar Cipher (decryptor)
ascii_lowercase
string.ascii_lowercase
string
index
in
First Idea
Cut Sentence
raise
ValueError
print
join
split
Naive Euclid
The Greatest Common Divisor
functools.reduce
reduce
functools
as
min
First
Disposable Teleports
pass
None
print
if-comprehension
elif
brute-force
Determinant
lambda
sum
list-comp
range
comprehension
max with key func
Best Stock
max
lambda
First
Fizz Buzz
elif
else
str
if
Ice Base
Reverse-reverse-roman (not fast though...)
Reverse Roman Numerals
elif
range
else
for
if
5
faster?
Feed Pigeons
max
print
while
8
RegExp Puzzle
Long Repeat
finditer
re.finditer
r-string
re
max
12
one-liner
Monkey Typing
lower
sum
if-comprehension
in
list-comp
12
2
THREE-LINES
Morse Encoder
lower
join
list-comp
comprehension
19
Worst O(N^2): counting continuing rectangles
Largest Rectangle in a Histogram
min
max
or
if-comprehension
elif
1
DFS, calculation time reduction using lcm
Making Change
functools.reduce
reduce
functools
continue
pop
simulate in order
Oil Pie
abs
sum
comprehension
else
for
First
Clock Angle
min
split
int
if
First impression
Counting Tiles
math.ceil
ceil
math
lambda
elif
Enlarge circle of relations
How to Find Friends
remove
set
while
in
False
Tokenize -> counting
Long Repeat
extend
map
max
join
append
Algorithmically answer
Roman Numerals
elif
else
if
First
The Most Numbers
min
max
else
len
if
Alice In Wonderland
One list comprehension
Zigzag Array
List
typing.List
typing
list-comp
range
9
First
The Fastest Horse
index
min
replace
max
list-comp
11
simple exchange
Swap Nodes
range
len
for
datetime.weekday
When is Friday?
date
datetime.date
datetime
map
split
First
Multiplication Table
bin
count
int
len
1
First
Middle Characters
else
len
if
Uniquen-Add: scan only once
Long Non Repeat
ValueError
index
except
try
len
First/DFS
Digits Doublets
copy
is
remove
None
or
Second/DFS with pruning
Digits Doublets
copy
is
remove
None
or
numpy can do very easily
Transposed Matrix
numpy.transpose
transpose
numpy
as
lambda
First
Transposed Matrix
append
list-comp
range
comprehension
len
GitHub
First
The Highest Building
continue
enumerate
index
sum
len
5
3
Have you used Sympy?
Shooting Range
sympy.linsolve
linsolve
sympy.Matrix
Matrix
sympy.symbols
12
:P
Solution for Anything
class
True
15
1
Documented
Barcode Reader
Optional
typing.Optional
is
ValueError
any
17
New test: check isGenerator?
Create Intervals (generator version)
yield
sorted
while
and
len
Directory-list
Simplify Unix Path
break
join
while
if-comprehension
False
Always True Cat
Solution for Anything
class
lambda
True
str
Easy-solution
The End of Other
endswith
or
False
and
True
2
First
Broken Clock
datetime.time
time
datetime.timedelta
timedelta
as
NUMPY IS COOL
Shooting Range
numpy.linalg
linalg
numpy.array
array
numpy
Recursive
Merge Intervals
max
else
len
if
First
Long Repeat Inside
break
or
while
and
range
Basic
Area of a Convex Polygon
abs
else
len
if
1
First
Expand Intervals
extend
typing.Iterable
Iterable
typing
range
Power Diffusion
Power Supply
update
dict-comp
set
not
if-comprehension
Sort_merge
Create Intervals
sorted
while
and
append
len
First
The End of Other
endswith
is
or
False
and
right-handed
Open Labyrinth
break
print
while
elif
else
First
The Most Frequent Weekdays
date
datetime.date
ValueError
datetime
except
Dropbox
Clear and pythonic
Worth of Words
max
sum
comprehension
1
6
Fool answer, can't solve large N
Numbers Factory
while
range
int
for
if
10
sympy.********, with many comments
Hubspot Amulet
fraction
sympy.fraction
sympy.linsolve
linsolve
sympy.Matrix
19
1
First
Friendly Number
format
round
abs
while
and
First
URL Normalization
startswith
re.compile
compile
re.sub
sub
First
The Longest Palindromic
print
range
len
for
if
1
2147483647
The Best Number Ever
First
Simple Hashlib
hashlib.sha1
hashlib.sha224
hashlib.sha256
hashlib.sha384
hashlib.sha512
First
Humpty Dumpty Form
math.atanh
atanh
math.asin
asin
math.pi
more clever answer, can solve large N
Numbers Factory
math.sqrt
sqrt
remove
math
except
sympy.circle, awesome!
Three Points Circle
sympy.geometry.polygon.Circle
sympy.geometry.polygon.Point
Circle
Point
center
First
Speech Module
endswith
int
if
PyCon TW
First
Sum Consecutives
while
append
else
len
if
10
Second
House Password
re.search
search
all
re
len
1
First
Ryerson Letter Grade
raise
ValueError
range
int
str
First
Digit Stack
pop
in
elif
append
int
A bit optimized brute-force. Not speedy
Double Substring
in
range
len
for
if
First
Robot Sort
break
sorted
join
while
append
Search and destroy
Calculate Islands
itertools.product
product
itertools
remove
enumerate
First
Simple Areas
math.pi
pi
math
sum
elif
1
Simple recursion
Golden Pyramid
max
else
len
if
Rydia's ans
House Password
re.search
search
re
None
False
Storage
First
Earth Distances
math.cos
cos
math.sin
sin
re.split
5
1
One-liner
Skew-symmetric Matrix
all
lambda
range
comprehension
len
Second answer
Word Pattern
isdigit
inline-if
join
list-comp
comprehension
First
Group Equal consecutive
while
and
append
len
1
First
Weak Point
index
min
sum
append
list-comp
First
English to Braille Translator
zfill
functools.reduce
reduce
extend
functools
Straight implementation
Playfair Cipher
divmod
find
isalpha
index
isdigit
First, O(n^2)
The Rows of Cakes
math.nan
nan
values
get
round
basic solution
Saw the Stick
break
sum
while
elif
True
First?
Moria Doors
union
intersection
index
min
replace
Making ONE is very easy
Restricted Prime
while
False
True
if
HubSpot
Common implementation
City's Happiness
get
pop
min
set
or
10
BFS, detect cities connected to source
Node Disconnected Users
set
sum
while
if-comprehension
in
1
simple?
Auto Painting
join
list-comp
range
comprehension
str
First idea
New Cities
pop
set
while
if-comprehension
in
Golfed
Restricted Sum
not
inline-if
len
Second
The Hamming Distance
bin
sum
range
comprehension
else
Rydia's ans
Restricted Sum
else
len
if
1
First
The Hamming Distance
print
range
int
for
if
Honest imprement
Number Base
ValueError
except
try
int
Blizzard
Brute force, np.all
Spaceship Landing Strip
numpy.all
numpy.array
array
numpy
as
3
Some cheat?
Unlucky Days
date
datetime.date
datetime
sum
if-comprehension
10
stepwise search
Safe Coasts
itertools.product
product
itertools
remove
break
Less patterns
Min and Max
get
None
lambda
elif
len
1
memorized for loop
Stair Steps
max
range
len
for
1
Align from head
String Conversion
min
abs
max
or
elif
Simpler check, use regexp
Stressful Subject
endswith
re.search
search
r-string
isupper
Search-and-destroy
Radiation Search
extend
pop
while
if-comprehension
and
First
Weekend Counter
datetime.timedelta
timedelta
datetime
while
if
First
The Angles of a Triangle
math.acos
acos
math.pi
pi
round
Brute-force
Spaceship Landing Strip
continue
IndexError
except
try
max
Rock
Recursive Depth-first-search, and list comprehensioooooooon
Berserk Rook
min
max
not
if-comprehension
and
2
2
even simple
Parity Bit Generator
chr
bin
count
join
if-comprehension
10
First
CheckSum
isalnum
ord
inline-if
sum
if-comprehension
18
One-liner
Parity Bit Generator
chr
bin
count
join
if-comprehension
First
Life Counter
inline-if
sum
and
list-comp
range
AddUntilNumber_simple
Super Root
while
Shelter
No looped search with modifying pattern
Seven Segment
set-comp
islower
isupper
lower
count
1
1
Not too long ver. speedy?
Ghosts Age
for
if
2
2
Can anyone find wrong case?
The Nearest Square Number
int
5
2
First virsion was too long to accept CheckiO.
Ghosts Age
in
else
if
5
Recursive, counter to original weird class
Completely Empty
collections.Iterable
hasattr
type
isinstance
is
First solution(slow)
Pattern Recognition
all
list-comp
range
comprehension
len
1
Codeship
A* search with heap queue
8 Puzzle
heappush
heapq.heappush
heappop
heapq.heappop
heapq
10
Simple
The Square Chest
all
sum
sorted
if-comprehension
in
Floodfill
The Territory of Go
is
pass
add
pop
index
Basic solution, small improvement in main function
Texas Referee
isinstance
is
all
index
None
Recursive simulation
Pearls in the Box
round
count
elif
else
if
O(dice_number*target)
Probably Dice
max
sum
range
for
if
Naive simulation solution
Pearls in the Box
round
sum
if-comprehension
elif
comprehension
Hermit
Hamming distance
Mono Captcha
break
lambda
sum
if-comprehension
list-comp
3
O(sqrt(N))
Count Consecutive Summers
break
while
True
if
4
1
Not so speedy but...
Break Rings
difference
min
set
count
in
4
First
The Good Radix
pass
except
try
range
int
7
Simple
Fractions Addition
functools.reduce
reduce
functools
format
min
Watchtower
Dynamic programming
DNA Common Sequence
set
max
sorted
join
if-comprehension
2
2
FOOL answer
Numbered Triangles
itertools.permutations
permutations
itertools.product
product
itertools
3
2
NxN-sized board compatible, time O(2**N)
Wall Keeper
class
break
or
sum
while
4
First impression
Rotate Hole
all
append
list-comp
range
comprehension
16
First
Bag of Santa Claus
math.e
e
math
max
elif
Diamond-wise search
Bacteria Colonies
all
continue
abs
or
elif
First Idea, not optimal for number of attempts and speed
Number Guess
all
not
False
True
list-comp
First
Funny Addition
sum
Escher
np.argmax
The Stone Wall
argmax
numpy.argmax
numpy
as
count
4
sum of distance, well separated
Compass, Map and Spyglass
numpy.where
where
numpy.array
array
numpy
6
Easy go with sympy
Wild Dogs
sympy.Line
Line
sympy.Point
Point
sympy
13
np array expression, with rot90
Keys and Locks
numpy.array_equal
array_equal
numpy.sum
numpy.rot90
rot90
16
First
The Ship Teams
or
sorted
if-comprehension
list-comp
comprehension
validity check and eval, improved
Safe Code
startswith
eval
findall
re.findall
r-string
Record min&max
Ground for the House
min
max
if-comprehension
list-comp
split
1
int2word
The Secret Room
dict-comp
index
lambda
sorted
join
Not On Map
find max_cnt
Most Wanted Letter
chr
ord
set
max
lower