From: "Brian Schröder" Date: 2005-12-02T22:52:00+09:00 Subject: Re: [QUIZ] Weird Numbers (#57) On 02/12/05, Ruby Quiz wrote: > The three rules of Ruby Quiz: > > 1. Please do not post any solutions or spoiler discussion for this quiz until > 48 hours have passed from the time on this message. > > 2. Support Ruby Quiz by submitting ideas as often as you can: > > http://www.rubyquiz.com/ > > 3. Enjoy! > > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > > by Martin DeMello > > A weird number is defined as a number, n, such that the sum of all its divisors > (excluding n itself) is greater than n, but no subset of its divisors sums up to > exactly n. > > Write a program to find all the weird numbers less than a given input. > > I imagine that 1 is also excluded as a divisor, otherwise the answer would be the empty set always. Brian -- http://ruby.brian-schroeder.de/ Stringed instrument chords: http://chordlist.brian-schroeder.de/