Sha256: d0b17553d15b4e6f03249074870ce85ac1db59185d7a1d4d8ea83bc6c82038fb
Contents?: true
Size: 484 Bytes
Versions: 69
Compression:
Stored size: 484 Bytes
Contents
defmodule PerfectNumbers do @doc """ Determine the aliquot sum of the given `number`, by summing all the factors of `number`, aside from `number` itself. Based on this sum, classify the number as: :perfect if the aliquot sum is equal to `number` :abundant if the aliquot sum is greater than `number` :deficient if the aliquot sum is less than `number` """ @spec classify(number :: integer) :: {:ok, atom} | {:error, String.t()} def classify(number) do end end
Version data entries
69 entries across 69 versions & 1 rubygems