Sha256: 031fdc72f04bf31f6d0ccf530bba5a66c072a163fcd49e23b85b9e472a28e12f
Contents?: true
Size: 255 Bytes
Versions: 44
Compression:
Stored size: 255 Bytes
Contents
package summultiples func MultipleSummer(divisors ...int) func(int) int { return func(limit int) int { sum := 0 for i := 1; i < limit; i++ { for _, d := range divisors { if i%d == 0 { sum += i break } } } return sum } }
Version data entries
44 entries across 44 versions & 1 rubygems