problem 1196 (ruby version accepted)