Sha256: e63944c76206036514d01632f12f5b370bc1c5206a1d8d02665776f0512ce280
Contents?: true
Size: 360 Bytes
Versions: 36
Compression:
Stored size: 360 Bytes
Contents
# coding: utf-8 class Integer # A factorion is a number equal to the sum of the factorials of its decimal # digits. # # Returns true if self is a factorion; false otherwise. # # 145.factorion? #=> true # 40585.factorion? #=> true # 200.factorion? #=> false # def factorion? [1, 2, 145, 40585].include? self end end
Version data entries
36 entries across 36 versions & 1 rubygems