
문제자연수 N과 M이 주어졌을 때, 아래 조건을 만족하는 길이가 M인 수열을 모두 구하는 프로그램을 작성하시오.1부터 N까지 자연수 중에서 M개를 고른 수열같은 수를 여러 번 골라도 된다. 코드using System.Text;int[] arr;int N, M;StringBuilder sb = new StringBuilder();string[] input = Console.ReadLine().Split();N = int.Parse(input[0]);M = int.Parse(input[1]);arr = new int[M];Dfs(0);Console.Write(sb.ToString());void Dfs(int depth){ if (depth == M) { for (int i = 0; i..