Created
December 28, 2014 04:38
-
-
Save CoryFoy/ca9af200efa58b11f2f7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| first_pass = { | |
| "A" => "1000000", | |
| "B" => "0100000", | |
| "C" => "0010000", | |
| "D" => "0001000", | |
| "E" => "0000100", | |
| "F" => "0000010", | |
| "G" => "0000001", | |
| "H" => "1100000", | |
| "I" => "1010000", | |
| "J" => "1001000", | |
| "K" => "1000100", | |
| "L" => "1000010", | |
| "M" => "1000001", | |
| "N" => "1110000", | |
| "O" => "1101000", | |
| "P" => "1100100", | |
| "Q" => "1100010", | |
| "R" => "1100001", | |
| "S" => "1111000", | |
| "T" => "1110100", | |
| "U" => "1110010", | |
| "V" => "1110001", | |
| "W" => "1111100", | |
| "X" => "1111010", | |
| "Y" => "1111001", | |
| "Z" => "1111100" | |
| } | |
| second_pass = { | |
| "A" => "1000011", | |
| "B" => "0100011", | |
| "C" => "0010011", | |
| "D" => "0001011", | |
| "E" => "0000111", | |
| "F" => "0000011", | |
| "G" => "0000011", | |
| "H" => "1100011", | |
| "I" => "1010011", | |
| "J" => "1001011", | |
| "K" => "1000111", | |
| "L" => "1000011", | |
| "M" => "1000011", | |
| "N" => "1110011", | |
| "O" => "1101011", | |
| "P" => "1100111", | |
| "Q" => "1100011", | |
| "R" => "1100011", | |
| "S" => "1111011", | |
| "T" => "1110111", | |
| "U" => "1110011", | |
| "V" => "1110011", | |
| "W" => "1111111", | |
| "X" => "1111011", | |
| "Y" => "1111011", | |
| "Z" => "1111111" | |
| } | |
| used_points = first_pass.values | |
| second_pass.each_pair do |pair| | |
| puts "#{pair.first} code already used!" if used_points.include?(pair.last) | |
| end |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's a table of the results: