{
int i1,i2,i3,i4,i5,i6,i7,i8;
for (i1=1;i1<32;i1++)
for (i2=1;i2<32;i2++){if (i1==i2) continue;
for (i3=1;i3<32;i3++){if (i1==i3) continue; if (i2==i3) continue;
for (i4=1;i4<32;i4++){if (i1==i4) continue; if (i2==i4) continue; if (i3==i4) continue;
for (i5=1;i5<32;i5++){if (i1==i5) continue; if (i2==i5) continue; if (i3==i5) continue; if (i4==i5) continue;
for (i6=1;i6<32;i6++){if (i1==i6) continue; if (i2==i6) continue; if (i3==i6) continue; if (i4==i6) continue; if (i5==i6) continue;
for (i7=1;i7<32;i7++){if (i1==i7) continue; if (i2==i7) continue; if (i3==i7) continue; if (i4==i7) continue; if (i5==i7) continue; if (i6==i7) continue;
for (i8=1;i8<32;i8++){if (i1==i8) continue; if (i2==i8) continue; if (i3==i8) continue; if (i4==i8) continue; if (i5==i8) continue; if (i6==i8) continue; if (i7==i8) continue;
printf("%d,%d,%d,%d,%d,%d,%d,%d\n",i1,i2,i3,i4,i5,i6,i7,i8);
}}}}}}}
}
不過估計沒有什麽用,因為輸出的組合數多達
31*30*29*28*27*26*25/(1*2*3*4*5*6*7*8)個
沒有實際意義。