ホームページ >バックエンド開発 >PHPチュートリアル >このアルゴリズムを見つける
たとえば、今配列があります
$array=Array("a",'b','c','d','e','f','g');
LZ の質問は少し曖昧なようです。たとえば、文字 a
a はカウントされます。 1 つの aa は 1 つとして数えられるので、aaaaaaaaaaaaaaaaaaaa も 1 つとなります
完了するまでにどのくらい時間がかかりますか?たとえば、アレイがあります。今はアレイがあります。もちろん、それ以上のものがあります
ad
ae
af
ag
ba
bb
bc
bd
be
bf
bg
ca
cb
cc
…………
gaaaaaaa
がぁぁぁぁぁ
がぁぁぁぁ
がぁぁぁぁ
がぁぁぁぁ
… ………
これらの文字で構成できるすべての文字列をリストするだけです
問題ありません、無制限です。 。 。
eaa04db9f161771db81f722c65a6dcc7$v){
echo $array[$i].$v."240ba9b8b41c0e62d2c6177341f6fc46 a
[1] => b
[2] => c
[3] => aa
[4] => ab
[5] => ac
[6] => ba
[7] => bb
[8] => bc
[9] => ca
[10] => cb
[11] => cc
[12] => aaa
[13] => aab
[14] => aac
[15] => aba
[16] => abb
[17] => abc
[18] => aca
[19] => acb
[20] => acc
[21] => baa
[22] => bab
[23] => bac
[24] => bba
[25] => bbb
[26] => bbc
[27] => bca
[28] => bcb
[29] => bcc
[30] => caa
[31] => cab
[32] => cac
[33] => cba
[34] => cbb
[35] => cbc
[36] => cca
[37] => ccb
[38] => ccc
[39] => aaaa
[40] => aaab
[41] => aaac
[42] => aaba
[43] => aabb
[44] => aabc
[45] => aaca
[46] => aacb
[47] => aacc
[48] => abaa
[49] => abab
[50] => abac
[51] => abba
[52] => abbb
[53] => abbc
[54] => abca
[55] => abcb
[56] => abcc
[57] => acaa
[58] => acab
[59] => acac
[60] => acba
[61] => acbb
[62] => acbc
[63] => acca
[64] => accb
[65] => accc
[66] => baaa
[67] => baab
[68] => baac
[69] => baba
[70] => babb
[71] => babc
[72] => baca
[73] => bacb
[74] => bacc
[75] => bbaa
[76] => bbab
[77] => bbac
[78] => bbba
[79] => bbbb
[80] => bbbc
[81] => bbca
[82] => bbcb
[83] => bbcc
[84] => bcaa
[85] => bcab
[86] => bcac
[87] => bcba
[88] => bcbb
[89] => bcbc
[90] => bcca
[91] => bccb
[92] => bccc
[93] => caaa
[94] => タクシー
[95] => caac
[96] => キャバ
[97] => タクシー
[98] => cabc
[99] => カカ
[100] => cacb
[101] => cacc
[102] => cbaa
[103] => cbab
[104] => cbac
[105] => cbba
[106] => cbbb
[107] => cbbc
[108] => cbca
[109] => cbcb
[110] => cbcc
[111] => ccaa
[112] => ccab
[113] => ccac
[114] => ccba
[115] => ccbb
[116] => ccbc
[117] => CCCA
[118] => cccb
[119] => cccc
)
配列
(
[0] => a
[1] => b
[2] => c
[3] => aa [4] =& gt; 腹部 [5
[7]
[8]
[10] > CC
)