输出X位数字的全部组合;
例如用户想得到5位数字的全部组合,则返回
00000
00001
...
99999
有点懵,没思路,麻烦大家帮帮忙
相关问题
- Android Studio 3.0 Canary 4 Emulators Stuck in Reb
- Start android emulator adb from Jenkins in windows
- connect error of socket programming via ndk
- getViewByID Returns null for the Listview
- android gridlayout not showing in emulator API 22
相关文章
- .NetCore Host.CreateDefaultBuilder 源码
- microsoft visio 2010反向工程异常终止
- Installation error: INSTALL_FAILED_INSUFFICIENT_ST
- Testing in “Airplane” mode in Android Emulator
- Android emulator - error while loading state for i
- SDK Manager is missing older Android System images
- ASP.NET CORE如何通过承载启动注册中间件?
- How to know which android devices support video pl
int n=4,m=n-1;
String[] options = {"A","B","C","D"};
int choice[]={-1,-1,-1,-1};
int flag=0;
while(flag>-1) {
choice[flag] = choice[flag]+1;
if (choice[flag]>m) {
choice[flag]=-1;
flag--;
continue;
}
if(flag==m) {
for (int p:choice)
System.out.print(options[p]+" ");
System.out.println();
}
else
flag++;
}
效果就是把所有我排列形式枚举出来。