#include <string.h>
#include <stdio.h>
#include <stdlib.h>
void combine(char *value,char *result,int m)
{
if(m == )
{
while(*value != '\0')
{
printf("%s%c\n",result,*value);
value++;
}
}
int value_len = strlen(value);
int result_len = strlen(result);
int i = ;
for(i = ;i < value_len - m + ;i++)
{
result[result_len] = *value;
result[result_len + ] = '\0';
value++;
combine(value,result,m - );
}
}
int main()
{
printf("输入字符集:\n");
char value[];
scanf("%s",value);
printf("输入组合的数字:\n");
int m;
scanf("%d",&m);
char *result = (char *)malloc(m + );
memset(result,,m + );
combine(value,result,m);
return ;
}