Sha256: 5c3b50e0ea8df4fababd387221597318f6762440efab90b80bdd838d7b06abb9

Contents?: true

Size: 491 Bytes

Versions: 195

Compression:

Stored size: 491 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

195 entries across 195 versions & 1 rubygems

Version Path
trackler-2.2.1.29 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.28 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.27 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.26 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.25 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.24 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.23 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.22 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.21 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.20 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.19 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.18 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.17 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.16 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.15 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.14 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.13 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.12 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.11 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.10 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs