Last active
August 21, 2016 19:01
-
-
Save Thunder33345/195444d21cca9b0e53850b0f8968ed99 to your computer and use it in GitHub Desktop.
Solving Challenge By @ifvictr Link Here https://gist.github.com/ifvictr/3c0ca581b61cad4a4f243a09302f0137 and the console output is on https://gist.github.com/Thunder33345/9cb106ff7dfd524f537d177d5ebc4823
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
<?php | |
/* Made By Thunder33345 */ | |
// In respond to https://gist.github.com/ifvictr/3c0ca581b61cad4a4f243a09302f0137 | |
/* | |
1 N, B, D, M, J, P, R, S, T, L | |
2 O, U, Y, R, T, L, H, A, E, I | |
3 T, L, N, A, C, D, E, O, R, S | |
4 E, D, H, K, Y, R, S, T, L, N | |
*/ | |
$r1 =['N', 'B','D', 'M', 'J', 'P', 'R', 'S', 'T', 'L']; | |
$r2 = ['O', 'U', 'Y', 'R', 'T', 'L', 'H', 'A', 'E', 'I']; | |
$r3 = ['T','L','N','A','C', 'D', 'E', 'O', 'R', 'S']; | |
$r4 = ['E', 'D', 'H', 'K', 'Y', 'R', 'S', 'T', 'L', 'N']; | |
$i1=0; | |
$combos = null; | |
$cc = 0; | |
foreach ($r1 as $l1) { | |
foreach ($r2 as $l2) { | |
foreach ($r3 as $l3){ | |
foreach ($r4 as $l4){ | |
$combos .= $l1.$l2.$l3.$l4."\n"; | |
$cc++; | |
} | |
} | |
} | |
} | |
echo $combos; | |
echo "Total Possible Combination: $cc"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment