-
-
Save anonymous/a5b2bc022554d03a719da0c23de126b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def romanize(num) | |
D.map do |ltr, val| | |
amt, num = num.to_i.divmod(val) | |
ltr.to_s * amt | |
end.join | |
end | |
ARGV.each do |a| | |
puts romanize a | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment