Sha256: b9af7822fb9d96349016af5cfb1b1f02a9c6e8cc9ba916ccbf00b4b1a25c5dad

Contents?: true

Size: 404 Bytes

Versions: 2

Compression:

Stored size: 404 Bytes

Contents

#!/usr/bin/env ruby

require 'bundler/setup'
require 'hrom512/nmax'

USAGE = 'Usage: cat FILE | nmax NUMBERS_COUNT'

unless ARGV.size == 1
  puts USAGE
  exit
end

numbers_count = ARGV.first.to_i
unless numbers_count > 0
  puts USAGE
  exit
end

numbers_finder = Hrom512::Nmax::MaxNumbersFinder.new($stdin, numbers_count)
max_numbers = numbers_finder.find

max_numbers.each do |number|
  puts number
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hrom512-nmax-0.1.2 bin/nmax
hrom512-nmax-0.1.1 bin/nmax