solve 001-008 by Ruby