in reply to Matrix Formation
1.Antirice asked if I can repeat the numbers: Answer is yes: ie.. [ [1,2],[4,2]] is allowed.
2. pzbagel: In mentioning of next if $n =~ /0\d+/;. \d+ was necessary to because I just don't wanted the formed-numbers that begins with 0. Anywhere else 0 in the number is fine. For 2x2 matrix this should work fine.
4. Other apporach:, Start forming matrix starting from the highest divisor.
4. Few other related challanges are
- Find a matrix for each divisor possible with lowest possible total of numbers in the matrix. ex.. [[1 2] [3,0]]:Total = 6
- Origianl matrix can have numbers with K digits. K > 1. Example: K= 2 [ [12, 34],[56,78]]
- It could be NXNXN Matrix : Example: 3 x 3 x 3 Matrix: If we take K= 1 here, according to Rhose's approach we will have 1000/27 = 35 as maximum divisor.