Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
4 つの文字があり、それらを 3 つの場所に配置したいとします (繰り返しは許可されています)。したがって、4 3 =64 通りの順列が可能です。それらを計算して印刷するにはどうすればよいですか?
疑似コード ソリューション:
Generate the (base ten) numbers 0 to 63. Change them to base 4, which only has the digits 0, 1, 2, and 3. Convert numbers to letters.
実際の Matlab コードは、学生の演習として残しています。