Magnets

hard
Input
Output
Click Run to execute
Previous
Cryptarithmetic
Next
Lexicographical Numbers

Related Questions