Solutions for riddles #0 and #1