Skip to content

Instantly share code, notes, and snippets.

@dosbol
Created January 26, 2017 07:01
Show Gist options
  • Save dosbol/17117a9ecd6a05081cf97c7c37ae5ff8 to your computer and use it in GitHub Desktop.
Save dosbol/17117a9ecd6a05081cf97c7c37ae5ff8 to your computer and use it in GitHub Desktop.
[Draft]Returns all possible combinations from input
(defn appendV [i v] (for [row [i] column v] (str row column)))
(appendV 5 [5 4 7])
("55" "54" "57")
(loop [s1 ["1"] s2 [1 2 3] i 0]
(if (= (count s2) (count (nth s1 i)) ) s1 (recur (conj s1 (appendV (nth s1 i) s2)) s2 (inc i) ) ) )
["1" ("11" "12" "13")]
(conj ["1"] ["11" "12"])
["1" ["11" "12"]]
(apply conj ["1"] ["11" "12"])
["1" "11" "12"]
(loop [s1 ["1"] s2 [1 2 3] i 0]
(if (= (count s2) (count (nth s1 i)) ) s1 (recur (apply conj s1 (appendV (nth s1 i) s2)) s2 (inc i) ) ) )
["1" "11" "12" "13" "111" "112" "113" "121" "122" "123" "131" "132" "133"]
(loop [s1 ["1" "2" "3"] s2 [1 2 3] i 0]
(if (= (count s2) (count (nth s1 i)) ) s1 (recur (apply conj s1 (appendV (nth s1 i) s2)) s2 (inc i) ) ) )
["1" "2" "3" "11" "12" "13" "21" "22" "23" "31" "32" "33" "111" "112" "113" "121" "122" "123" "131" "132" "133" "211" "212" "213" "221" "222" "223" "231" "232" "233" "311" "312" "313" "321" "322" "323" "331" "332" "333"]
(loop [s1 ["1" "2" "3"] s2 [1 2 3] i 0] (let [ith (nth s1 i)]
(if (= (count s2) (count ith) ) s1 (recur (apply conj s1 (appendV ith s2)) s2 (inc i) ) ) ) )
["1" "2" "3" "11" "12" "13" "21" "22" "23" "31" "32" "33" "111" "112" "113" "121" "122" "123" "131" "132" "133" "211" "212" "213" "221" "222" "223" "231" "232" "233" "311" "312" "313" "321" "322" "323" "331" "332" "333"]
(loop [s1 ["1" "2" "3"] s2 ["1" "2" "3"] i 0] (let [ith (nth s1 i)]
(if (= (count s2) (count ith) ) s1 (recur (apply conj s1 (appendV ith s2)) s2 (inc i) ) ) ) )
["1" "2" "3" "11" "12" "13" "21" "22" "23" "31" "32" "33" "111" "112" "113" "121" "122" "123" "131" "132" "133" "211" "212" "213" "221" "222" "223" "231" "232" "233" "311" "312" "313" "321" "322" "323" "331" "332" "333"]
(count (loop [s1 ["1" "2" "3"] s2 ["1" "2" "3"] i 0] (let [ith (nth s1 i)]
(if (= (count s2) (count ith) ) s1 (recur (apply conj s1 (appendV ith s2)) s2 (inc i))))))
39
(vec (seq (str 123)))
["1" "2" "3"]
(defn combinations [input] (let[invec (vec (seq (str 123)))] (loop [s1 invec s2 invec i 0] (let [ith (nth s1 i)]
(if (= (count s2) (count ith) ) s1 (recur (apply conj s1 (appendV ith s2)) s2 (inc i)))))))
(combinations 1)
["1" "2" "3" "11" "12" "13" "21" "22" "23" "31" "32" "33" "111" "112" "113" "121" "122" "123" "131" "132" "133" "211" "212" "213" "221" "222" "223" "231" "232" "233" "311" "312" "313" "321" "322" "323" "331" "332" "333"]
(combinations 12)
["1" "2" "3" "11" "12" "13" "21" "22" "23" "31" "32" "33" "111" "112" "113" "121" "122" "123" "131" "132" "133" "211" "212" "213" "221" "222" "223" "231" "232" "233" "311" "312" "313" "321" "322" "323" "331" "332" "333"]
(defn combinations [input] (let[invec (vec (seq (str input)))] (loop [s1 invec s2 invec i 0] (let [ith (nth s1 i)]
(if (= (count s2) (count ith) ) s1 (recur (apply conj s1 (appendV ith s2)) s2 (inc i)))))))
(combinations 1)
["1"]
(combinations 12)
["1" "2" "11" "12" "21" "22"]
(combinations 123)
["1" "2" "3" "11" "12" "13" "21" "22" "23" "31" "32" "33" "111" "112" "113" "121" "122" "123" "131" "132" "133" "211" "212" "213" "221" "222" "223" "231" "232" "233" "311" "312" "313" "321" "322" "323" "331" "332" "333"]
(combinations 1234)
["1" "2" "3" "4" "11" "12" "13" "14" "21" "22" "23" "24" "31" "32" "33" "34" "41" "42" "43" "44" "111" "112" "113" "114" "121" "122" "123" "124" "131" "132" "133" "134" "141" "142" "143" "144" "211" "212" "213" "214" "221" "222" "223" "224" "231" "232" "233" "234" "241" "242" "243" "244" "311" "312" "313" "314" "321" "322" "323" "324" "331" "332" "333" "334" "341" "342" "343" "344" "411" "412" "413" "414" "421" "422" "423" "424" "431" "432" "433" "434" "441" "442" "443" "444" "1111" "1112" "1113" "1114" "1121" "1122" "1123" "1124" "1131" "1132" "1133" "1134" "1141" "1142" "1143" "1144" "1211" "1212" "1213" "1214" "1221" "1222" "1223" "1224" "1231" "1232" "1233" "1234" "1241" "1242" "1243" "1244" "1311" "1312" "1313" "1314" "1321" "1322" "1323" "1324" "1331" "1332" "1333" "1334" "1341" "1342" "1343" "1344" "1411" "1412" "1413" "1414" "1421" "1422" "1423" "1424" "1431" "1432" "1433" "1434" "1441" "1442" "1443" "1444" "2111" "2112" "2113" "2114" "2121" "2122" "2123" "2124" "2131" "2132" "2133" "2134" "2141" "2142" "2143" "2144" "2211" "2212" "2213" "2214" "2221" "2222" "2223" "2224" "2231" "2232" "2233" "2234" "2241" "2242" "2243" "2244" "2311" "2312" "2313" "2314" "2321" "2322" "2323" "2324" "2331" "2332" "2333" "2334" "2341" "2342" "2343" "2344" "2411" "2412" "2413" "2414" "2421" "2422" "2423" "2424" "2431" "2432" "2433" "2434" "2441" "2442" "2443" "2444" "3111" "3112" "3113" "3114" "3121" "3122" "3123" "3124" "3131" "3132" "3133" "3134" "3141" "3142" "3143" "3144" "3211" "3212" "3213" "3214" "3221" "3222" "3223" "3224" "3231" "3232" "3233" "3234" "3241" "3242" "3243" "3244" "3311" "3312" "3313" "3314" "3321" "3322" "3323" "3324" "3331" "3332" "3333" "3334" "3341" "3342" "3343" "3344" "3411" "3412" "3413" "3414" "3421" "3422" "3423" "3424" "3431" "3432" "3433" "3434" "3441" "3442" "3443" "3444" "4111" "4112" "4113" "4114" "4121" "4122" "4123" "4124" "4131" "4132" "4133" "4134" "4141" "4142" "4143" "4144" "4211" "4212" "4213" "4214" "4221" "4222" "4223" "4224" "4231" "4232" "4233" "4234" "4241" "4242" "4243" "4244" "4311" "4312" "4313" "4314" "4321" "4322" "4323" "4324" "4331" "4332" "4333" "4334" "4341" "4342" "4343" "4344" "4411" "4412" "4413" "4414" "4421" "4422" "4423" "4424" "4431" "4432" "4433" "4434" "4441" "4442" "4443" "4444"]
(combinations 45852)
["4" "5" "8" "5" "2" "44" "45" "48" "45" "42" "54" "55" "58" "55" "52" "84" "85" "88" "85" "82" "54" "55" "58" "55" "52" "24" "25" "28" "25" "22" "444" "445" "448" "445" "442" "454" "455" "458" "455" "452" "484" "485" "488" "485" "482" "454" "455" "458" "455" "452" "424" "425" "428" "425" "422" "544" "545" "548" "545" "542" "554" "555" "558" "555" "552" "584" "585" "588" "585" "582" "554" "555" "558" "555" "552" "524" "525" "528" "525" "522" "844" "845" "848" "845" "842" "854" "855" "858" "855" "852" "884" "885" "888" "885" "882" "854" "855" "858" "855" "852" "824" "825" "828" "825" "822" "544" "545" "548" "545" "542" "554" "555" "558" "555" "552" "584" "585" "588" "585" "582" "554" "555" "558" "555" "552" "524" "525" "528" "525" "522" "244" "245" "248" "245" "242" "254" "255" "258" "255" "252" "284" "285" "288" "285" "282" "254" "255" "258" "255" "252" "224" "225" "228" "225" "222" "4444" "4445" "4448" "4445" "4442" "4454" "4455" "4458" "4455" "4452" "4484" "4485" "4488" "4485" "4482" "4454" "4455" "4458" "4455" "4452" "4424" "4425" "4428" "4425" "4422" "4544" "4545" "4548" "4545" "4542" "4554" "4555" "4558" "4555" "4552" "4584" "4585" "4588" "4585" "4582" "4554" "4555" "4558" "4555" "4552" "4524" "4525" "4528" "4525" "4522" "4844" "4845" "4848" "4845" "4842" "4854" "4855" "4858" "4855" "4852" "4884" "4885" "4888" "4885" "4882" "4854" "4855" "4858" "4855" "4852" "4824" "4825" "4828" "4825" "4822" "4544" "4545" "4548" "4545" "4542" "4554" "4555" "4558" "4555" "4552" "4584" "4585" "4588" "4585" "4582" "4554" "4555" "4558" "4555" "4552" "4524" "4525" "4528" "4525" "4522" "4244" "4245" "4248" "4245" "4242" "4254" "4255" "4258" "4255" "4252" "4284" "4285" "4288" "4285" "4282" "4254" "4255" "4258" "4255" "4252" "4224" "4225" "4228" "4225" "4222" "5444" "5445" "5448" "5445" "5442" "5454" "5455" "5458" "5455" "5452" "5484" "5485" "5488" "5485" "5482" "5454" "5455" "5458" "5455" "5452" "5424" "5425" "5428" "5425" "5422" "5544" "5545" "5548" "5545" "5542" "5554" "5555" "5558" "5555" "5552" "5584" "5585" "5588" "5585" "5582" "5554" "5555" "5558" "5555" "5552" "5524" "5525" "5528" "5525" "5522" "5844" "5845" "5848" "5845" "5842" "5854" "5855" "5858" "5855" "5852" "5884" "5885" "5888" "5885" "5882" "5854" "5855" "5858" "5855" "5852" "5824" "5825" "5828" "5825" "5822" "5544" "5545" "5548" "5545" "5542" "5554" "5555" "5558" "5555" "5552" "5584" "5585" "5588" "5585" "5582" "5554" "5555" "5558" "5555" "5552" "5524" "5525" "5528" "5525" "5522" "5244" "5245" "5248" "5245" "5242" "5254" "5255" "5258" "5255" "5252" "5284" "5285" "5288" "5285" "5282" "5254" "5255" "5258" "5255" "5252" "5224" "5225" "5228" "5225" "5222" "8444" "8445" "8448" "8445" "8442" "8454" "8455" "8458" "8455" "8452" "8484" "8485" "8488" "8485" "8482" "8454" "8455" "8458" "8455" "8452" "8424" "8425" "8428" "8425" "8422" "8544" "8545" "8548" "8545" "8542" "8554" "8555" "8558" "8555" "8552" "8584" "8585" "8588" "8585" "8582" "8554" "8555" "8558" "8555" "8552" "8524" "8525" "8528" "8525" "8522" "8844" "8845" "8848" "8845" "8842" "8854" "8855" "8858" "8855" "8852" "8884" "8885" "8888" "8885" "8882" "8854" "8855" "8858" "8855" "8852" "8824" "8825" "8828" "8825" "8822" "8544" "8545" "8548" "8545" "8542" "8554" "8555" "8558" "8555" "8552" "8584" "8585" "8588" "8585" "8582" "8554" "8555" "8558" "8555" "8552" "8524" "8525" "8528" "8525" "8522" "8244" "8245" "8248" "8245" "8242" "8254" "8255" "8258" "8255" "8252" "8284" "8285" "8288" "8285" "8282" "8254" "8255" "8258" "8255" "8252" "8224" "8225" "8228" "8225" "8222" "5444" "5445" "5448" "5445" "5442" "5454" "5455" "5458" "5455" "5452" "5484" "5485" "5488" "5485" "5482" "5454" "5455" "5458" "5455" "5452" "5424" "5425" "5428" "5425" "5422" "5544" "5545" "5548" "5545" "5542" "5554" "5555" "5558" "5555" "5552" "5584" "5585" "5588" "5585" "5582" "5554" "5555" "5558" "5555" "5552" "5524" "5525" "5528" "5525" "5522" "5844" "5845" "5848" "5845" "5842" "5854" "5855" "5858" "5855" "5852" "5884" "5885" "5888" "5885" "5882" "5854" "5855" "5858" "5855" "5852" "5824" "5825" "5828" "5825" "5822" "5544" "5545" "5548" "5545" "5542" "5554" "5555" "5558" "5555" "5552" "5584" "5585" "5588" "5585" "5582" "5554" "5555" "5558" "5555" "5552" "5524" "5525" "5528" "5525" "5522" "5244" "5245" "5248" "5245" "5242" "5254" "5255" "5258" "5255" "5252" "5284" "5285" "5288" "5285" "5282" "5254" "5255" "5258" "5255" "5252" "5224" "5225" "5228" "5225" "5222" "2444" "2445" "2448" "2445" "2442" "2454" "2455" "2458" "2455" "2452" "2484" "2485" "2488" "2485" "2482" "2454" "2455" "2458" "2455" "2452" "2424" "2425" "2428" "2425" "2422" "2544" "2545" "2548" "2545" "2542" "2554" "2555" "2558" "2555" "2552" "2584" "2585" "2588" "2585" "2582" "2554" "2555" "2558" "2555" "2552" "2524" "2525" "2528" "2525" "2522" "2844" "2845" "2848" "2845" "2842" "2854" "2855" "2858" "2855" "2852" "2884" "2885" "2888" "2885" "2882" "2854" "2855" "2858" "2855" "2852" "2824" "2825" "2828" "2825" "2822" "2544" "2545" "2548" "2545" "2542" "2554" "2555" "2558" "2555" "2552" "2584" "2585" "2588" "2585" "2582" "2554" "2555" "2558" "2555" "2552" "2524" "2525" "2528" "2525" "2522" "2244" "2245" "2248" "2245" "2242" "2254" "2255" "2258" "2255" "2252" "2284" "2285" "2288" "2285" "2282" "2254" "2255" "2258" "2255" "2252" "2224" "2225" "2228" "2225" "2222" "44444" "44445" "44448" "44445" "44442" "44454" "44455" "44458" "44455" "44452" "44484" "44485" "44488" "44485" "44482" "44454" "44455" "44458" "44455" "44452" "44424" "44425" "44428" "44425" "44422" "44544" "44545" "44548" "44545" "44542" "44554" "44555" "44558" "44555" "44552" "44584" "44585" "44588" "44585" "44582" "44554" "44555" "44558" "44555" "44552" "44524" "44525" "44528" "44525" "44522" "44844" "44845" "44848" "44845" "44842" "44854" "44855" "44858" "44855" "44852" "44884" "44885" "44888" "44885" "44882" "44854" "44855" "44858" "44855" "44852" "44824" "44825" "44828" "44825" "44822" "44544" "44545" "44548" "44545" "44542" "44554" "44555" "44558" "44555" "44552" "44584" "44585" "44588" "44585" "44582" "44554" "44555" "44558" "44555" "44552" "44524" "44525" "44528" "44525" "44522" "44244" "44245" "44248" "44245" "44242" "44254" "44255" "44258" "44255" "44252" "44284" "44285" "44288" "44285" "44282" "44254" "44255" "44258" "44255" "44252" "44224" "44225" "44228" "44225" "44222" "45444" "45445" "45448" "45445" "45442" "45454" "45455" "45458" "45455" "45452" "45484" "45485" "45488" "45485" "45482" "45454" "45455" "45458" "45455" "45452" "45424" "45425" "45428" "45425" "45422" "45544" "45545" "45548" "45545" "45542" "45554" "45555" "45558" "45555" "45552" "45584" "45585" "45588" "45585" "45582" "45554" "45555" "45558" "45555" "45552" "45524" "45525" "45528" "45525" "45522" "45844" "45845" "45848" "45845" "45842" "45854" "45855" "45858" "45855" "45852" "45884" "45885" "45888" "45885" "45882" "45854" "45855" "45858" "45855" "45852" "45824" "45825" "45828" "45825" "45822" "45544" "45545" "45548" "45545" "45542" "45554" "45555" "45558" "45555" "45552" "45584" "45585" "45588" "45585" "45582" "45554" "45555" "45558" "45555" "45552" "45524" "45525" "45528" "45525" "45522" "45244" "45245" "45248" "45245" "45242" "45254" "45255" "45258" "45255" "45252" "45284" "45285" "45288" "45285" "45282" "45254" "45255" "45258" "45255" "45252" "45224" "45225" "45228" "45225" "45222" "48444" "48445" "48448" "48445" "48442" "48454" "48455" "48458" "48455" "48452" "48484" "48485" "48488" "48485" "48482" "48454" "48455" "48458" "48455" "48452" "48424" "48425" "48428" "48425" "48422" "48544" "48545" "48548" "48545" "48542" "48554" "48555" "48558" "48555" "48552" "48584" "48585" "48588" "48585" "48582" "48554" "48555" "48558" "48555" "48552" "48524" "48525" "48528" "48525" "48522" "48844" "48845" "48848" "48845" "48842" "48854" "48855" "48858" "48855" "48852" "48884" "48885" "48888" "48885" "48882" "48854" "48855" "48858" "48855" "48852" "48824" "48825" "48828" "48825" "48822" "48544" "48545" "48548" "48545" "48542" "48554" "48555" "48558" "48555" "48552" "48584" "48585" "48588" "48585" "48582" "48554" "48555" "48558" "48555" "48552" "48524" "48525" "48528" "48525" "48522" "48244" "48245" "48248" "48245" "48242" "48254" "48255" "48258" "48255" "48252" "48284" "48285" "48288" "48285" "48282" "48254" "48255" "48258" "48255" "48252" "48224" "48225" "48228" "48225" "48222" "45444" "45445" "45448" "45445" "45442" "45454" "45455" "45458" "45455" "45452" "45484" "45485" "45488" "45485" "45482" "45454" "45455" "45458" "45455" "45452" "45424" "45425" "45428" "45425" "45422" "45544" "45545" "45548" "45545" "45542" "45554" "45555" "45558" "45555" "45552" "45584" "45585" "45588" "45585" "45582" "45554" "45555" "45558" "45555" "45552" "45524" "45525" "45528" "45525" "45522" "45844" "45845" "45848" "45845" "45842" "45854" "45855" "45858" "45855" "45852" "45884" "45885" "45888" "45885" "45882" "45854" "45855" "45858" "45855" "45852" "45824" "45825" "45828" "45825" "45822" "45544" "45545" "45548" "45545" "45542" "45554" "45555" "45558" "45555" "45552" "45584" "45585" "45588" "45585" "45582" "45554" "45555" "45558" "45555" "45552" "45524" "45525" "45528" "45525" "45522" "45244" "45245" "45248" "45245" "45242" "45254" "45255" "45258" "45255" "45252" "45284" "45285" "45288" "45285" "45282" "45254" "45255" "45258" "45255" "45252" "45224" "45225" "45228" "45225" "45222" "42444" "42445" "42448" "42445" "42442" "42454" "42455" "42458" "42455" "42452" "42484" "42485" "42488" "42485" "42482" "42454" "42455" "42458" "42455" "42452" "42424" "42425" "42428" "42425" "42422" "42544" "42545" "42548" "42545" "42542" "42554" "42555" "42558" "42555" "42552" "42584" "42585" "42588" "42585" "42582" "42554" "42555" "42558" "42555" "42552" "42524" "42525" "42528" "42525" "42522" "42844" "42845" "42848" "42845" "42842" "42854" "42855" "42858" "42855" "42852" "42884" "42885" "42888" "42885" "42882" "42854" "42855" "42858" "42855" "42852" "42824" "42825" "42828" "42825" "42822" "42544" "42545" "42548" "42545" "42542" "42554" "42555" "42558" "42555" "42552" "42584" "42585" "42588" "42585" "42582" "42554" "42555" "42558" "42555" "42552" "42524" "42525" "42528" "42525" "42522" "42244" "42245" "42248" "42245" "42242" "42254" "42255" "42258" "42255" "42252" "42284" "42285" "42288" "42285" "42282" "42254" "42255" "42258" "42255" "42252" "42224" "42225" "42228" "42225" "42222" "54444" "54445" "54448" "54445" "54442" "54454" "54455" "54458" "54455" "54452" "54484" "54485" "54488" "54485" "54482" "54454" "54455" "54458" "54455" "54452" "54424" "54425" "54428" "54425" "54422" "54544" "54545" "54548" "54545" "54542" "54554" "54555" "54558" "54555" "54552" "54584" "54585" "54588" "54585" "54582" "54554" "54555" "54558" "54555" "54552" "54524" "54525" "54528" "54525" "54522" "54844" "54845" "54848" "54845" "54842" "54854" "54855" "54858" "54855" "54852" "54884" "54885" "54888" "54885" "54882" "54854" "54855" "54858" "54855" "54852" "54824" "54825" "54828" "54825" "54822" "54544" "54545" "54548" "54545" "54542" "54554" "54555" "54558" "54555" "54552" "54584" "54585" "54588" "54585" "54582" "54554" "54555" "54558" "54555" "54552" "54524" "54525" "54528" "54525" "54522" "54244" "54245" "54248" "54245" "54242" "54254" "54255" "54258" "54255" "54252" "54284" "54285" "54288" "54285" "54282" "54254" "54255" "54258" "54255" "54252" "54224" "54225" "54228" "54225" "54222" "55444" "55445" "55448" "55445" "55442" "55454" "55455" "55458" "55455" "55452" "55484" "55485" "55488" "55485" "55482" "55454" "55455" "55458" "55455" "55452" "55424" "55425" "55428" "55425" "55422" "55544" "55545" "55548" "55545" "55542" "55554" "55555" "55558" "55555" "55552" "55584" "55585" "55588" "55585" "55582" "55554" "55555" "55558" "55555" "55552" "55524" "55525" "55528" "55525" "55522" "55844" "55845" "55848" "55845" "55842" "55854" "55855" "55858" "55855" "55852" "55884" "55885" "55888" "55885" "55882" "55854" "55855" "55858" "55855" "55852" "55824" "55825" "55828" "55825" "55822" "55544" "55545" "55548" "55545" "55542" "55554" "55555" "55558" "55555" "55552" "55584" "55585" "55588" "55585" "55582" "55554" "55555" "55558" "55555" "55552" "55524" "55525" "55528" "55525" "55522" "55244" "55245" "55248" "55245" "55242" "55254" "55255" "55258" "55255" "55252" "55284" "55285" "55288" "55285" "55282" "55254" "55255" "55258" "55255" "55252" "55224" "55225" "55228" "55225" "55222" "58444" "58445" "58448" "58445" "58442" "58454" "58455" "58458" "58455" "58452" "58484" "58485" "58488" "58485" "58482" "58454" "58455" "58458" "58455" "58452" "58424" "58425" "58428" "58425" "58422" "58544" "58545" "58548" "58545" "58542" "58554" "58555" "58558" "58555" "58552" "58584" "58585" "58588" "58585" "58582" "58554" "58555" "58558" "58555" "58552" "58524" "58525" "58528" "58525" "58522" "58844" "58845" "58848" "58845" "58842" "58854" "58855" "58858" "58855" "58852" "58884" "58885" "58888" "58885" "58882" "58854" "58855" "58858" "58855" "58852" "58824" "58825" "58828" "58825" "58822" "58544" "58545" "58548" "58545" "58542" "58554" "58555" "58558" "58555" "58552" "58584" "58585" "58588" "58585" "58582" "58554" "58555" "58558" "58555" "58552" "58524" "58525" "58528" "58525" "58522" "58244" "58245" "58248" "58245" "58242" "58254" "58255" "58258" "58255" "58252" "58284" "58285" "58288" "58285" "58282" "58254" "58255" "58258" "58255" "58252" "58224" "58225" "58228" "58225" "58222" "55444" "55445" "55448" "55445" "55442" "55454" "55455" "55458" "55455" "55452" "55484" "55485" "55488" "55485" "55482" "55454" "55455" "55458" "55455" "55452" "55424" "55425" "55428" "55425" "55422" "55544" "55545" "55548" "55545" "55542" "55554" "55555" "55558" "55555" "55552" "55584" "55585" "55588" "55585" "55582" "55554" "55555" "55558" "55555" "55552" "55524" "55525" "55528" "55525" "55522" "55844" "55845" "55848" "55845" "55842" "55854" "55855" "55858" "55855" "55852" "55884" "55885" "55888" "55885" "55882" "55854" "55855" "55858" "55855" "55852" "55824" "55825" "55828" "55825" "55822" "55544" "55545" "55548" "55545" "55542" "55554" "55555" "55558" "55555" "55552" "55584" "55585" "55588" "55585" "55582" "55554" "55555" "55558" "55555" "55552" "55524" "55525" "55528" "55525" "55522" "55244" "55245" "55248" "55245" "55242" "55254" "55255" "55258" "55255" "55252" "55284" "55285" "55288" "55285" "55282" "55254" "55255" "55258" "55255" "55252" "55224" "55225" "55228" "55225" "55222" "52444" "52445" "52448" "52445" "52442" "52454" "52455" "52458" "52455" "52452" "52484" "52485" "52488" "52485" "52482" "52454" "52455" "52458" "52455" "52452" "52424" "52425" "52428" "52425" "52422" "52544" "52545" "52548" "52545" "52542" "52554" "52555" "52558" "52555" "52552" "52584" "52585" "52588" "52585" "52582" "52554" "52555" "52558" "52555" "52552" "52524" "52525" "52528" "52525" "52522" "52844" "52845" "52848" "52845" "52842" "52854" "52855" "52858" "52855" "52852" "52884" "52885" "52888" "52885" "52882" "52854" "52855" "52858" "52855" "52852" "52824" "52825" "52828" "52825" "52822" "52544" "52545" "52548" "52545" "52542" "52554" "52555" "52558" "52555" "52552" "52584" "52585" "52588" "52585" "52582" "52554" "52555" "52558" "52555" "52552" "52524" "52525" "52528" "52525" "52522" "52244" "52245" "52248" "52245" "52242" "52254" "52255" "52258" "52255" "52252" "52284" "52285" "52288" "52285" "52282" "52254" "52255" "52258" "52255" "52252" "52224" "52225" "52228" "52225" "52222" "84444" "84445" "84448" "84445" "84442" "84454" "84455" "84458" "84455" "84452" "84484" "84485" "84488" "84485" "84482" "84454" "84455" "84458" "84455" "84452" "84424" "84425" "84428" "84425" "84422" "84544" "84545" "84548" "84545" "84542" "84554" "84555" "84558" "84555" "84552" "84584" "84585" "84588" "84585" "84582" "84554" "84555" "84558" "84555" "84552" "84524" "84525" "84528" "84525" "84522" "84844" "84845" "84848" "84845" "84842" "84854" "84855" "84858" "84855" "84852" "84884" "84885" "84888" "84885" "84882" "84854" "84855" "84858" "84855" "84852" "84824" "84825" "84828" "84825" "84822" "84544" "84545" "84548" "84545" "84542" "84554" "84555" "84558" "84555" "84552" "84584" "84585" "84588" "84585" "84582" "84554" "84555" "84558" "84555" "84552" "84524" "84525" "84528" "84525" "84522" "84244" "84245" "84248" "84245" "84242" "84254" "84255" "84258" "84255" "84252" "84284" "84285" "84288" "84285" "84282" "84254" "84255" "84258" "84255" "84252" "84224" "84225" "84228" "84225" "84222" "85444" "85445" "85448" "85445" "85442" "85454" "85455" "85458" "85455" "85452" "85484" "85485" "85488" "85485" "85482" "85454" "85455" "85458" "85455" "85452" "85424" "85425" "85428" "85425" "85422" "85544" "85545" "85548" "85545" "85542" "85554" "85555" "85558" "85555" "85552" "85584" "85585" "85588" "85585" "85582" "85554" "85555" "85558" "85555" "85552" "85524" "85525" "85528" "85525" "85522" "85844" "85845" "85848" "85845" "85842" "85854" "85855" "85858" "85855" "85852" "85884" "85885" "85888" "85885" "85882" "85854" "85855" "85858" "85855" "85852" "85824" "85825" "85828" "85825" "85822" "85544" "85545" "85548" "85545" "85542" "85554" "85555" "85558" "85555" "85552" "85584" "85585" "85588" "85585" "85582" "85554" "85555" "85558" "85555" "85552" "85524" "85525" "85528" "85525" "85522" "85244" "85245" "85248" "85245" "85242" "85254" "85255" "85258" "85255" "85252" "85284" "85285" "85288" "85285" "85282" "85254" "85255" "85258" "85255" "85252" "85224" "85225" "85228" "85225" "85222" "88444" "88445" "88448" "88445" "88442" "88454" "88455" "88458" "88455" "88452" "88484" "88485" "88488" "88485" "88482" "88454" "88455" "88458" "88455" "88452" "88424" "88425" "88428" "88425" "88422" "88544" "88545" "88548" "88545" "88542" "88554" "88555" "88558" "88555" "88552" "88584" "88585" "88588" "88585" "88582" "88554" "88555" "88558" "88555" "88552" "88524" "88525" "88528" "88525" "88522" "88844" "88845" "88848" "88845" "88842" "88854" "88855" "88858" "88855" "88852" "88884" "88885" "88888" "88885" "88882" "88854" "88855" "88858" "88855" "88852" "88824" "88825" "88828" "88825" "88822" "88544" "88545" "88548" "88545" "88542" "88554" "88555" "88558" "88555" "88552" "88584" "88585" "88588" "88585" "88582" "88554" "88555" "88558" "88555" "88552" "88524" "88525" "88528" "88525" "88522" "88244" "88245" "88248" "88245" "88242" "88254" "88255" "88258" "88255" "88252" "88284" "88285" "88288" "88285" "88282" "88254" "88255" "88258" "88255" "88252" "88224" "88225" "88228" "88225" "88222" "85444" "85445" "85448" "85445" "85442" "85454" "85455" "85458" "85455" "85452" "85484" "85485" "85488" "85485" "85482" "85454" "85455" "85458" "85455" "85452" "85424" "85425" "85428" "85425" "85422" "85544" "85545" "85548" "85545" "85542" "85554" "85555" "85558" "85555" "85552" "85584" "85585" "85588" "85585" "85582" "85554" "85555" "85558" "85555" "85552" "85524" "85525" "85528" "85525" "85522" "85844" "85845" "85848" "85845" "85842" "85854" "85855" "85858" "85855" "85852" "85884" "85885" "85888" "85885" "85882" "85854" "85855" "85858" "85855" "85852" "85824" "85825" "85828" "85825" "85822" "85544" "85545" "85548" "85545" "85542" "85554" "85555" "85558" "85555" "85552" "85584" "85585" "85588" "85585" "85582" "85554" "85555" "85558" "85555" "85552" "85524" "85525" "85528" "85525" "85522" "85244" "85245" "85248" "85245" "85242" "85254" "85255" "85258" "85255" "85252" "85284" "85285" "85288" "85285" "85282" "85254" "85255" "85258" "85255" "85252" "85224" "85225" "85228" "85225" "85222" "82444" "82445" "82448" "82445" "82442" "82454" "82455" "82458" "82455" "82452" "82484" "82485" "82488" "82485" "82482" "82454" "82455" "82458" "82455" "82452" "82424" "82425" "82428" "82425" "82422" "82544" "82545" "82548" "82545" "82542" "82554" "82555" "82558" "82555" "82552" "82584" "82585" "82588" "82585" "82582" "82554" "82555" "82558" "82555" "82552" "82524" "82525" "82528" "82525" "82522" "82844" "82845" "82848" "82845" "82842" "82854" "82855" "82858" "82855" "82852" "82884" "82885" "82888" "82885" "82882" "82854" "82855" "82858" "82855" "82852" "82824" "82825" "82828" "82825" "82822" "82544" "82545" "82548" "82545" "82542" "82554" "82555" "82558" "82555" "82552" "82584" "82585" "82588" "82585" "82582" "82554" "82555" "82558" "82555" "82552" "82524" "82525" "82528" "82525" "82522" "82244" "82245" "82248" "82245" "82242" "82254" "82255" "82258" "82255" "82252" "82284" "82285" "82288" "82285" "82282" "82254" "82255" "82258" "82255" "82252" "82224" "82225" "82228" "82225" "82222" "54444" "54445" "54448" "54445" "54442" "54454" "54455" "54458" "54455" "54452" "54484" "54485" "54488" "54485" "54482" "54454" "54455" "54458" "54455" "54452" "54424" "54425" "54428" "54425" "54422" "54544" "54545" "54548" "54545" "54542" "54554" "54555" "54558" "54555" "54552" "54584" "54585" "54588" "54585" "54582" "54554" "54555" "54558" "54555" "54552" "54524" "54525" "54528" "54525" "54522" "54844" "54845" "54848" "54845" "54842" "54854" "54855" "54858" "54855" "54852" "54884" "54885" "54888" "54885" "54882" "54854" "54855" "54858" "54855" "54852" "54824" "54825" "54828" "54825" "54822" "54544" "54545" "54548" "54545" "54542" "54554" "54555" "54558" "54555" "54552" "54584" "54585" "54588" "54585" "54582" "54554" "54555" "54558" "54555" "54552" "54524" "54525" "54528" "54525" "54522" "54244" "54245" "54248" "54245" "54242" "54254" "54255" "54258" "54255" "54252" "54284" "54285" "54288" "54285" "54282" "54254" "54255" "54258" "54255" "54252" "54224" "54225" "54228" "54225" "54222" "55444" "55445" "55448" "55445" "55442" "55454" "55455" "55458" "55455" "55452" "55484" "55485" "55488" "55485" "55482" "55454" "55455" "55458" "55455" "55452" "55424" "55425" "55428" "55425" "55422" "55544" "55545" "55548" "55545" "55542" "55554" "55555" "55558" "55555" "55552" "55584" "55585" "55588" "55585" "55582" "55554" "55555" "55558" "55555" "55552" "55524" "55525" "55528" "55525" "55522" "55844" "55845" "55848" "55845" "55842" "55854" "55855" "55858" "55855" "55852" "55884" "55885" "55888" "55885" "55882" "55854" "55855" "55858" "55855" "55852" "55824" "55825" "55828" "55825" "55822" "55544" "55545" "55548" "55545" "55542" "55554" "55555" "55558" "55555" "55552" "55584" "55585" "55588" "55585" "55582" "55554" "55555" "55558" "55555" "55552" "55524" "55525" "55528" "55525" "55522" "55244" "55245" "55248" "55245" "55242" "55254" "55255" "55258" "55255" "55252" "55284" "55285" "55288" "55285" "55282" "55254" "55255" "55258" "55255" "55252" "55224" "55225" "55228" "55225" "55222" "58444" "58445" "58448" "58445" "58442" "58454" "58455" "58458" "58455" "58452" "58484" "58485" "58488" "58485" "58482" "58454" "58455" "58458" "58455" "58452" "58424" "58425" "58428" "58425" "58422" "58544" "58545" "58548" "58545" "58542" "58554" "58555" "58558" "58555" "58552" "58584" "58585" "58588" "58585" "58582" "58554" "58555" "58558" "58555" "58552" "58524" "58525" "58528" "58525" "58522" "58844" "58845" "58848" "58845" "58842" "58854" "58855" "58858" "58855" "58852" "58884" "58885" "58888" "58885" "58882" "58854" "58855" "58858" "58855" "58852" "58824" "58825" "58828" "58825" "58822" "58544" "58545" "58548" "58545" "58542" "58554" "58555" "58558" "58555" "58552" "58584" "58585" "58588" "58585" "58582" "58554" "58555" "58558" "58555" "58552" "58524" "58525" "58528" "58525" "58522" "58244" "58245" "58248" "58245" "58242" "58254" "58255" "58258" "58255" "58252" "58284" "58285" "58288" "58285" "58282" "58254" "58255" "58258" "58255" "58252" "58224" "58225" "58228" "58225" "58222" "55444" "55445" "55448" "55445" "55442" "55454" "55455" "55458" "55455" "55452" "55484" "55485" "55488" "55485" "55482" "55454" "55455" "55458" "55455" "55452" "55424" "55425" "55428" "55425" "55422" "55544" "55545" "55548" "55545" "55542" "55554" "55555" "55558" "55555" "55552" "55584" "55585" "55588" "55585" "55582" "55554" "55555" "55558" "55555" "55552" "55524" "55525" "55528" "55525" "55522" "55844" "55845" "55848" "55845" "55842" "55854" "55855" "55858" "55855" "55852" "55884" "55885" "55888" "55885" "55882" "55854" "55855" "55858" "55855" "55852" "55824" "55825" "55828" "55825" "55822" "55544" "55545" "55548" "55545" "55542" "55554" "55555" "55558" "55555" "55552" "55584" "55585" "55588" "55585" "55582" "55554" "55555" "55558" "55555" "55552" "55524" "55525" "55528" "55525" "55522" "55244" "55245" "55248" "55245" "55242" "55254" "55255" "55258" "55255" "55252" "55284" "55285" "55288" "55285" "55282" "55254" "55255" "55258" "55255" "55252" "55224" "55225" "55228" "55225" "55222" "52444" "52445" "52448" "52445" "52442" "52454" "52455" "52458" "52455" "52452" "52484" "52485" "52488" "52485" "52482" "52454" "52455" "52458" "52455" "52452" "52424" "52425" "52428" "52425" "52422" "52544" "52545" "52548" "52545" "52542" "52554" "52555" "52558" "52555" "52552" "52584" "52585" "52588" "52585" "52582" "52554" "52555" "52558" "52555" "52552" "52524" "52525" "52528" "52525" "52522" "52844" "52845" "52848" "52845" "52842" "52854" "52855" "52858" "52855" "52852" "52884" "52885" "52888" "52885" "52882" "52854" "52855" "52858" "52855" "52852" "52824" "52825" "52828" "52825" "52822" "52544" "52545" "52548" "52545" "52542" "52554" "52555" "52558" "52555" "52552" "52584" "52585" "52588" "52585" "52582" "52554" "52555" "52558" "52555" "52552" "52524" "52525" "52528" "52525" "52522" "52244" "52245" "52248" "52245" "52242" "52254" "52255" "52258" "52255" "52252" "52284" "52285" "52288" "52285" "52282" "52254" "52255" "52258" "52255" "52252" "52224" "52225" "52228" "52225" "52222" "24444" "24445" "24448" "24445" "24442" "24454" "24455" "24458" "24455" "24452" "24484" "24485" "24488" "24485" "24482" "24454" "24455" "24458" "24455" "24452" "24424" "24425" "24428" "24425" "24422" "24544" "24545" "24548" "24545" "24542" "24554" "24555" "24558" "24555" "24552" "24584" "24585" "24588" "24585" "24582" "24554" "24555" "24558" "24555" "24552" "24524" "24525" "24528" "24525" "24522" "24844" "24845" "24848" "24845" "24842" "24854" "24855" "24858" "24855" "24852" "24884" "24885" "24888" "24885" "24882" "24854" "24855" "24858" "24855" "24852" "24824" "24825" "24828" "24825" "24822" "24544" "24545" "24548" "24545" "24542" "24554" "24555" "24558" "24555" "24552" "24584" "24585" "24588" "24585" "24582" "24554" "24555" "24558" "24555" "24552" "24524" "24525" "24528" "24525" "24522" "24244" "24245" "24248" "24245" "24242" "24254" "24255" "24258" "24255" "24252" "24284" "24285" "24288" "24285" "24282" "24254" "24255" "24258" "24255" "24252" "24224" "24225" "24228" "24225" "24222" "25444" "25445" "25448" "25445" "25442" "25454" "25455" "25458" "25455" "25452" "25484" "25485" "25488" "25485" "25482" "25454" "25455" "25458" "25455" "25452" "25424" "25425" "25428" "25425" "25422" "25544" "25545" "25548" "25545" "25542" "25554" "25555" "25558" "25555" "25552" "25584" "25585" "25588" "25585" "25582" "25554" "25555" "25558" "25555" "25552" "25524" "25525" "25528" "25525" "25522" "25844" "25845" "25848" "25845" "25842" "25854" "25855" "25858" "25855" "25852" "25884" "25885" "25888" "25885" "25882" "25854" "25855" "25858" "25855" "25852" "25824" "25825" "25828" "25825" "25822" "25544" "25545" "25548" "25545" "25542" "25554" "25555" "25558" "25555" "25552" "25584" "25585" "25588" "25585" "25582" "25554" "25555" "25558" "25555" "25552" "25524" "25525" "25528" "25525" "25522" "25244" "25245" "25248" "25245" "25242" "25254" "25255" "25258" "25255" "25252" "25284" "25285" "25288" "25285" "25282" "25254" "25255" "25258" "25255" "25252" "25224" "25225" "25228" "25225" "25222" "28444" "28445" "28448" "28445" "28442" "28454" "28455" "28458" "28455" "28452" "28484" "28485" "28488" "28485" "28482" "28454" "28455" "28458" "28455" "28452" "28424" "28425" "28428" "28425" "28422" "28544" "28545" "28548" "28545" "28542" "28554" "28555" "28558" "28555" "28552" "28584" "28585" "28588" "28585" "28582" "28554" "28555" "28558" "28555" "28552" "28524" "28525" "28528" "28525" "28522" "28844" "28845" "28848" "28845" "28842" "28854" "28855" "28858" "28855" "28852" "28884" "28885" "28888" "28885" "28882" "28854" "28855" "28858" "28855" "28852" "28824" "28825" "28828" "28825" "28822" "28544" "28545" "28548" "28545" "28542" "28554" "28555" "28558" "28555" "28552" "28584" "28585" "28588" "28585" "28582" "28554" "28555" "28558" "28555" "28552" "28524" "28525" "28528" "28525" "28522" "28244" "28245" "28248" "28245" "28242" "28254" "28255" "28258" "28255" "28252" "28284" "28285" "28288" "28285" "28282" "28254" "28255" "28258" "28255" "28252" "28224" "28225" "28228" "28225" "28222" "25444" "25445" "25448" "25445" "25442" "25454" "25455" "25458" "25455" "25452" "25484" "25485" "25488" "25485" "25482" "25454" "25455" "25458" "25455" "25452" "25424" "25425" "25428" "25425" "25422" "25544" "25545" "25548" "25545" "25542" "25554" "25555" "25558" "25555" "25552" "25584" "25585" "25588" "25585" "25582" "25554" "25555" "25558" "25555" "25552" "25524" "25525" "25528" "25525" "25522" "25844" "25845" "25848" "25845" "25842" "25854" "25855" "25858" "25855" "25852" "25884" "25885" "25888" "25885" "25882" "25854" "25855" "25858" "25855" "25852" "25824" "25825" "25828" "25825" "25822" "25544" "25545" "25548" "25545" "25542" "25554" "25555" "25558" "25555" "25552" "25584" "25585" "25588" "25585" "25582" "25554" "25555" "25558" "25555" "25552" "25524" "25525" "25528" "25525" "25522" "25244" "25245" "25248" "25245" "25242" "25254" "25255" "25258" "25255" "25252" "25284" "25285" "25288" "25285" "25282" "25254" "25255" "25258" "25255" "25252" "25224" "25225" "25228" "25225" "25222" "22444" "22445" "22448" "22445" "22442" "22454" "22455" "22458" "22455" "22452" "22484" "22485" "22488" "22485" "22482" "22454" "22455" "22458" "22455" "22452" "22424" "22425" "22428" "22425" "22422" "22544" "22545" "22548" "22545" "22542" "22554" "22555" "22558" "22555" "22552" "22584" "22585" "22588" "22585" "22582" "22554" "22555" "22558" "22555" "22552" "22524" "22525" "22528" "22525" "22522" "22844" "22845" "22848" "22845" "22842" "22854" "22855" "22858" "22855" "22852" "22884" "22885" "22888" "22885" "22882" "22854" "22855" "22858" "22855" "22852" "22824" "22825" "22828" "22825" "22822" "22544" "22545" "22548" "22545" "22542" "22554" "22555" "22558" "22555" "22552" "22584" "22585" "22588" "22585" "22582" "22554" "22555" "22558" "22555" "22552" "22524" "22525" "22528" "22525" "22522" "22244" "22245" "22248" "22245" "22242" "22254" "22255" "22258" "22255" "22252" "22284" "22285" "22288" "22285" "22282" "22254" "22255" "22258" "22255" "22252" "22224" "22225" "22228" "22225" "22222"]
(combinations "a")
["a"]
(combinations "ab")
["a" "b" "aa" "ab" "ba" "bb"]
(combinations "abc")
["a" "b" "c" "aa" "ab" "ac" "ba" "bb" "bc" "ca" "cb" "cc" "aaa" "aab" "aac" "aba" "abb" "abc" "aca" "acb" "acc" "baa" "bab" "bac" "bba" "bbb" "bbc" "bca" "bcb" "bcc" "caa" "cab" "cac" "cba" "cbb" "cbc" "cca" "ccb" "ccc"]
(combinations "dabc")
["d" "a" "b" "c" "dd" "da" "db" "dc" "ad" "aa" "ab" "ac" "bd" "ba" "bb" "bc" "cd" "ca" "cb" "cc" "ddd" "dda" "ddb" "ddc" "dad" "daa" "dab" "dac" "dbd" "dba" "dbb" "dbc" "dcd" "dca" "dcb" "dcc" "add" "ada" "adb" "adc" "aad" "aaa" "aab" "aac" "abd" "aba" "abb" "abc" "acd" "aca" "acb" "acc" "bdd" "bda" "bdb" "bdc" "bad" "baa" "bab" "bac" "bbd" "bba" "bbb" "bbc" "bcd" "bca" "bcb" "bcc" "cdd" "cda" "cdb" "cdc" "cad" "caa" "cab" "cac" "cbd" "cba" "cbb" "cbc" "ccd" "cca" "ccb" "ccc" "dddd" "ddda" "dddb" "dddc" "ddad" "ddaa" "ddab" "ddac" "ddbd" "ddba" "ddbb" "ddbc" "ddcd" "ddca" "ddcb" "ddcc" "dadd" "dada" "dadb" "dadc" "daad" "daaa" "daab" "daac" "dabd" "daba" "dabb" "dabc" "dacd" "daca" "dacb" "dacc" "dbdd" "dbda" "dbdb" "dbdc" "dbad" "dbaa" "dbab" "dbac" "dbbd" "dbba" "dbbb" "dbbc" "dbcd" "dbca" "dbcb" "dbcc" "dcdd" "dcda" "dcdb" "dcdc" "dcad" "dcaa" "dcab" "dcac" "dcbd" "dcba" "dcbb" "dcbc" "dccd" "dcca" "dccb" "dccc" "addd" "adda" "addb" "addc" "adad" "adaa" "adab" "adac" "adbd" "adba" "adbb" "adbc" "adcd" "adca" "adcb" "adcc" "aadd" "aada" "aadb" "aadc" "aaad" "aaaa" "aaab" "aaac" "aabd" "aaba" "aabb" "aabc" "aacd" "aaca" "aacb" "aacc" "abdd" "abda" "abdb" "abdc" "abad" "abaa" "abab" "abac" "abbd" "abba" "abbb" "abbc" "abcd" "abca" "abcb" "abcc" "acdd" "acda" "acdb" "acdc" "acad" "acaa" "acab" "acac" "acbd" "acba" "acbb" "acbc" "accd" "acca" "accb" "accc" "bddd" "bdda" "bddb" "bddc" "bdad" "bdaa" "bdab" "bdac" "bdbd" "bdba" "bdbb" "bdbc" "bdcd" "bdca" "bdcb" "bdcc" "badd" "bada" "badb" "badc" "baad" "baaa" "baab" "baac" "babd" "baba" "babb" "babc" "bacd" "baca" "bacb" "bacc" "bbdd" "bbda" "bbdb" "bbdc" "bbad" "bbaa" "bbab" "bbac" "bbbd" "bbba" "bbbb" "bbbc" "bbcd" "bbca" "bbcb" "bbcc" "bcdd" "bcda" "bcdb" "bcdc" "bcad" "bcaa" "bcab" "bcac" "bcbd" "bcba" "bcbb" "bcbc" "bccd" "bcca" "bccb" "bccc" "cddd" "cdda" "cddb" "cddc" "cdad" "cdaa" "cdab" "cdac" "cdbd" "cdba" "cdbb" "cdbc" "cdcd" "cdca" "cdcb" "cdcc" "cadd" "cada" "cadb" "cadc" "caad" "caaa" "caab" "caac" "cabd" "caba" "cabb" "cabc" "cacd" "caca" "cacb" "cacc" "cbdd" "cbda" "cbdb" "cbdc" "cbad" "cbaa" "cbab" "cbac" "cbbd" "cbba" "cbbb" "cbbc" "cbcd" "cbca" "cbcb" "cbcc" "ccdd" "ccda" "ccdb" "ccdc" "ccad" "ccaa" "ccab" "ccac" "ccbd" "ccba" "ccbb" "ccbc" "cccd" "ccca" "cccb" "cccc"]
(count (combinations 1))
1
(count (combinations 2))
1
(count (combinations 12))
6
(count (combinations 123))
39
(count (combinations 1234))
340
(count (combinations 12345))
3905
(count (combinations 123456))
55986
(count (combinations 1234567))
960799
(count (combinations 12345678))
19173960
@dosbol
Copy link
Author

dosbol commented Jan 26, 2017

copy-paste from repl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment