Add #18 input file and Ruby solution