Sha256: 1e2c7e4d4c1ee70ba260a34a41a628248b16a861623e4112d798c94729bef073

Contents?: true

Size: 199 Bytes

Versions: 342

Compression:

Stored size: 199 Bytes

Contents

module BookKeeping
  VERSION = 1
end

module Grains
  def self.square(number)
    fail ArgumentError if number <= 0 || number > 64
    2**(number - 1)
  end

  def self.total
    2**64 - 1
  end
end

Version data entries

342 entries across 342 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/ruby/exercises/grains/.meta/solutions/grains.rb
trackler-2.2.1.179 tracks/ruby/exercises/grains/.meta/solutions/grains.rb
trackler-2.2.1.178 tracks/ruby/exercises/grains/.meta/solutions/grains.rb
trackler-2.2.1.177 tracks/ruby/exercises/grains/.meta/solutions/grains.rb
trackler-2.2.1.176 tracks/ruby/exercises/grains/.meta/solutions/grains.rb
trackler-2.2.1.175 tracks/ruby/exercises/grains/.meta/solutions/grains.rb
trackler-2.2.1.174 tracks/ruby/exercises/grains/.meta/solutions/grains.rb
trackler-2.2.1.173 tracks/ruby/exercises/grains/.meta/solutions/grains.rb
trackler-2.2.1.172 tracks/ruby/exercises/grains/.meta/solutions/grains.rb
trackler-2.2.1.171 tracks/ruby/exercises/grains/.meta/solutions/grains.rb
trackler-2.2.1.170 tracks/ruby/exercises/grains/.meta/solutions/grains.rb
trackler-2.2.1.169 tracks/ruby/exercises/grains/.meta/solutions/grains.rb
trackler-2.2.1.167 tracks/ruby/exercises/grains/.meta/solutions/grains.rb
trackler-2.2.1.166 tracks/ruby/exercises/grains/.meta/solutions/grains.rb
trackler-2.2.1.165 tracks/ruby/exercises/grains/.meta/solutions/grains.rb
trackler-2.2.1.164 tracks/ruby/exercises/grains/.meta/solutions/grains.rb
trackler-2.2.1.163 tracks/ruby/exercises/grains/.meta/solutions/grains.rb
trackler-2.2.1.162 tracks/ruby/exercises/grains/.meta/solutions/grains.rb
trackler-2.2.1.161 tracks/ruby/exercises/grains/.meta/solutions/grains.rb
trackler-2.2.1.160 tracks/ruby/exercises/grains/.meta/solutions/grains.rb