From: Gennady Bystritsky Date: 2009-11-12T01:17:05+09:00 Subject: Re: Roman Numerals (Arrgh!) On Nov 11, 2009, at 7:56 AM, Paul Smith wrote: >> >> Now you intrigued me ;-). So I am asking directly -- given the following $numerals: >> $numerals = [[1000, "M"], [500, "D"], [100, "C"], [50, "L"], [10, "X"], [5, "V"], [1, "I"]] > > $numerals = [[1000, "M"], [900, "CM"], [500, "D"], [400, "CD"], [100, > "C"], [90, "XC"], [50, "L"], [40, "XL"], [10, "X"], [9, "IX"], [5, > "V"], [4, "IV"], [1, "I"]] Oops, true. No morning coffee takes its dues ;-) -- I suspected that's what was implied, however somehow started thinking that the 2-character strings might be multiplied by that algorithm. My bad, it works indeed. Thank you guys, Gennady. > >> >> ...how one can transform it so that the original algorithm would produced shortened roman numbers? Please present the exact value of $numerals satisfying the above condition. >> >> Gennady. >> > > > > -- > Paul Smith > http://www.nomadicfun.co.uk > > paul@pollyandpaul.co.uk >