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.139 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.138 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.137 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.136 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.135 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.134 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.133 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.132 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.131 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.130 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.129 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.128 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.127 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.126 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.125 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.124 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.123 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.122 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.121 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs
trackler-2.2.1.120 tracks/elixir/exercises/perfect-numbers/perfect_numbers.exs