2
赞

//顺序输出一千万个6位含字母和数字的字符串组
#include <stdio.h>
char s[37]="0123456789abcdefghijklmnopqrstuvwxyz";
int a,b,c,d,e,f;
int i;
int main() {
i=0;
for (a=0;a<36;a++)
for (b=0;b<36;b++)
for (c=0;c<36;c++)
for (d=0;d<36;d++)
for (e=0;e<36;e++)
for (f=0;f<36;f++) {
if (a <10 && b <10 && c <10 && d <10 && e <10 && f <10) continue;
if (a>=10 && b>=10 && c>=10 && d>=10 && e>=10 && f>=10) continue;
i++;
printf("%c%c%c%c%c%c\n",s[a],s[b],s[c],s[d],s[e],s[f]);
if (i>=10000000) return 0;
}
return 0;
}
//00000a
//...
//00000z
//00001a
//...
//00001z
//00002a
//...
//...
//00009z
//0000a0
//...
//...
//05zmcf