From: "semmons99@..." Date: 2006-03-28T22:38:56+09:00 Subject: Re: B & E (#72) You are right that there are 10,000 unique codes, but each of those codes can have any of the three unique modifier keys attached to it so 10,000 * 3 = 30,000 unique combinations you must press. And, since there are 5 keys in the 4 key code + 1 modifier key, it is 30,000 * 5 = 150,000. At first I didn't realize this until I wrote the loop to generate all of the unique code/modifier key combinations. The one key to this I believe, is that you have to treat the modifier key (1,2,3) as part of the code not a seperate entity. Here is some code to prove the solution. output, num_codes = '', 0 10.times do |x1| 10.times do |x2| 10.times do |x3| 10.times do |x4| 3.times do |x5| output += x1.to_s + x2.to_s + x3.to_s + x4.to_s + x5.to_s num_codes += 1 end end end end end print "number codes: ", num_codes.to_s, "\n" print "output length: ", output.length, "\n"