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

Version Path
trackler-2.2.1.180 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.179 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.178 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.177 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.176 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.175 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.174 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.173 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.172 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.171 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.170 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.169 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.167 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.166 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.165 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.164 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.163 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.162 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.161 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.160 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs