从1-33 号球任选6个
现没有加入各种判断
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
int main(void) {
int h[]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33};
int l[]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16};
int pd(int p[6]){
int n=0;
for(int a=0;a<6;a++){
for(int b=a+1;b<6;b++){
if(p[a]==p[b]){
n=-1;
goto aa;
}
}
}
n=1;
aa: return n;
}
for(int a=0;a<33;a++){
for(int b=0;b<33;b++){
for(int c=0;c<33;c++){
for(int d=0;d<33;d++){
for(int e=0;e<33;e++){
for(int f=0;f<33;f++){
int z[]={a,b,c,d,e,f};
if(pd(z)>0){
printf("%d,%d,%d,%d,%d,%d ;",h[a],h[b],h[c],h[d],h[e],h[f]);
}
}
}
}
}
}
}
return 0;
}