| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 8688 人关注过本帖, 1 人收藏
标题:【原创】24点游戏程序之一
取消只看楼主 加入收藏
yu_hua
Rank: 2
等 级:论坛游民
帖 子:222
专家分:95
注 册:2006-8-10
结帖率:71.43%
收藏(1)
已结贴  问题点数:0 回复次数:13 
【原创】24点游戏程序之一
程序代码:
/*---------------------------------------------------------------------
                      24点游戏程序之一

对于点数不超过10的4张扑克牌,如有解,输出一种算法;否则,输出“failure”

----------------------------------------------------------------------*/
#include <stdio.h>
#include <math.h>
#include <string.h>
typedef int logic;

int ss[]={1234,1243,1324,1342,1423,1432, 2134,2143,2314,2341,2413,2431,
          3124,3142,3214,3241,3412,3421, 4123,4132,4213,4231,4312,4321};

int complevel(char op1, char op2)
{
    if((op1=='+'||op1=='-')&&(op2=='+'||op2=='-'))return 0;
    else if((op1=='*'||op1=='/')&&(op2=='*'||op2=='/'))return 0;
    else if((op1=='+'||op1=='-')&&(op2=='*'||op2=='/'))return -1;
    else if((op1=='*'||op1=='/')&&(op2=='+'||op2=='-'||op2=='_'))return 1;
    return -9999;
}

logic ILL,SUC;
char oper;
double op(double x, int iop, double y)
{
    double op=-9999;
    oper=' ';ILL=1;
    switch(iop)
    {
        case -1: if(x){op=y/x;oper='\\';ILL=0;}break;
        case  1: if(y){op=x/y;oper='/'; ILL=0;}break;
        case  0: op=fabs(x-y);oper=(x<y?'_':'-');ILL=0;break;
        case  2: op=x+y;oper='+';ILL=0;break;
        case  3: op=x*y;oper='*';ILL=0;break;
    }
    return op;
}

char opers[10];
logic layer(int aa,int bb,int cc,int dd)
{
    int ii,jj,kk;char output[30];
    double a=aa,b=bb,c=cc,d=dd;
    for(ii=3;ii>=-1;ii--)
    for(jj=3;jj>= 0;jj--)
    for(kk=3;kk>= 0;kk--)
    {   
        double x;
        x=op(a,kk,b);
        if(oper=='_')continue;
        opers[1]=oper;
        x=op(x,jj,c);
        if(ILL)continue;
        if(jj%2 && ii==-1)continue;
        if(oper=='_'&&(kk==2||kk==0))continue;
        opers[2]=oper;
        x=op(x,ii,d);
        if(ILL)continue;
        opers[3]=oper;
        if(fabs(x-24)<1e-8)
        {
            if(opers[2]=='_')
                sprintf(output,"(%d-%d%c%d)",cc,aa,opers[1],bb);
            else if(complevel(opers[1],opers[2])>=0)
                sprintf(output,"(%d%c%d%c%d)",aa,opers[1],bb,opers[2],cc);
            else
                sprintf(output,"((%d%c%d)%c%d)",aa,opers[1],bb,opers[2],cc);
            if(opers[3]=='\\')
                printf("%d%c%s=24",dd,'/',output);
            else if(opers[1]=='/'&&opers[2]=='*'&&opers[3]=='*')printf("%d*%d*%d/%d=24",aa,cc,dd,bb);
            else if(opers[2]=='/'&&opers[1]=='*'&&opers[3]=='*')printf("%d*%d*%d/%d=24",aa,bb,dd,cc);
            else if(opers[1]=='/'&&opers[2]=='*')printf( "%d*%d/%d%c%d=24" ,aa,cc,bb,opers[3],dd);
            else if(opers[2]=='/'&&opers[3]=='*')printf("(%d%c%d)*%d/%d=24",aa,opers[1],bb,dd,cc);
            else if(complevel(opers[2],opers[3])>=0)
            {
                 int len=strlen(output);
                 output[len-1]='\0';
                 printf("%s%c%d=24",output+1,opers[3],dd);
            }
            else
                 printf("%s%c%d=24",output,opers[3],dd);
            return 1;
        }
    }       
    return 0;
}

int group(int aa,int bb,int cc,int dd)
{
    int ii;
    double xy=0.0,a=aa,b=bb,c=cc,d=dd;
    for(ii=1;ii<10;ii++)
    {
        switch(ii)
        {
        case  1: xy= a*b + c*d ;strcpy(opers," *+*");break;
        case  2: xy= a*b - c*d ;strcpy(opers," *-*");break;
        case  3: xy= a*b + c/d ;strcpy(opers," *+/");break;
        case  4: xy= a*b - c/d ;strcpy(opers," *-/");break;
        case  5: xy= a*b /(c+d);strcpy(opers," */+");break;
        case  6: xy= a*b /(c-d);strcpy(opers," */-");break;
        case  7: xy=(a+b)*(c+d);strcpy(opers," +*+");break;
        case  8: xy=(a+b)*(c-d);strcpy(opers," +*-");break;
        case  9: if(a>b && c>d){
                 xy=(a-b)*(c-d);strcpy(opers," -*-");break;}
                 }
                 if(fabs(xy-24)<1e-8)
                 {
                    if(ii<=4)
                       printf("%d%c%d%c%d%c%d=24",aa,opers[1],bb,opers[2],cc,opers[3],dd);
                    else if(ii<=6)
                       printf("%d%c%d%c(%d%c%d)=24",aa,opers[1],bb,opers[2],cc,opers[3],dd);
                    else
                       printf("(%d%c%d)%c(%d%c%d)=24",aa,opers[1],bb,opers[2],cc,opers[3],dd);
                    return 1;
                 }
    }
    return 0;
}

int main( void )
{
    int unsolve=0;
    int card[4],ir,aa,bb,cc,dd;
    for(card[0]=      1; card[0]<=10; card[0]++)
    for(card[1]=card[0]; card[1]<=10; card[1]++)
    for(card[2]=card[1]; card[2]<=10; card[2]++)
    for(card[3]=card[2]; card[3]<=10; card[3]++)
    {   SUC=0;
        printf("%d,%d,%d,%d: ",card[0],card[1],card[2],card[3]);
        for(ir=23;ir>=0;ir--)
        {
            unsigned s=ss[ir];
            aa=card[s/1000-1];
            bb=card[s/100%10-1];
            cc=card[s/10%10-1];
            dd=card[s%10-1];
            if(group(aa,bb,cc,dd))
            {
               SUC=1;break;
            }
            else if(layer(aa,bb,cc,dd))
            {
               SUC=1;break;
            }
        }
        if(!SUC)printf("failure(%d)",++unsolve);
        printf("\n");
    }
    return 0;
}
搜索更多相关主题的帖子: 游戏 
2010-11-11 18:23
yu_hua
Rank: 2
等 级:论坛游民
帖 子:222
专家分:95
注 册:2006-8-10
收藏
得分:0 
运行结果如下
1,1,1,1: failure(1)
1,1,1,2: failure(2)
1,1,1,3: failure(3)
1,1,1,4: failure(4)
1,1,1,5: failure(5)
1,1,1,6: failure(6)
1,1,1,7: failure(7)
1,1,1,8: (1+1+1)*8=24
1,1,1,9: failure(8)
1,1,1,10: failure(9)
1,1,2,2: failure(10)
1,1,2,3: failure(11)
1,1,2,4: failure(12)
1,1,2,5: failure(13)
1,1,2,6: (2+1+1)*6=24
1,1,2,7: (7+1)*(2+1)=24
1,1,2,8: (2+1)*8*1=24
1,1,2,9: (2+1)*(9-1)=24
1,1,2,10: (10+2)*(1+1)=24
1,1,3,3: failure(14)
1,1,3,4: (1+1)*4*3=24
1,1,3,5: (5+1)*(3+1)=24
1,1,3,6: (6+1+1)*3=24
1,1,3,7: (7+1)*3*1=24
1,1,3,8: 8*3*1*1=24
1,1,3,9: (9+3)*(1+1)=24
1,1,3,10: (10-1-1)*3=24
1,1,4,4: (4+1+1)*4=24
1,1,4,5: (5+1)*4*1=24
1,1,4,6: 6*4*1*1=24
1,1,4,7: (7+1)*(4-1)=24
1,1,4,8: (8+4)*(1+1)=24
1,1,4,9: (9-1)*(4-1)=24
1,1,4,10: (1+1)*10+4=24
1,1,5,5: 5*5-1*1=24
1,1,5,6: (6-1)*5-1=24
1,1,5,7: (7+5)*(1+1)=24
1,1,5,8: (5-1-1)*8=24
1,1,5,9: failure(15)
1,1,5,10: failure(16)
1,1,6,6: (6+6)*(1+1)=24
1,1,6,7: failure(17)
1,1,6,8: 8*6/(1+1)=24
1,1,6,9: (1+1)*9+6=24
1,1,6,10: failure(18)
1,1,7,7: failure(19)
1,1,7,8: failure(20)
1,1,7,9: failure(21)
1,1,7,10: (1+1)*7+10=24
1,1,8,8: (1+1)*8+8=24
1,1,8,9: failure(22)
1,1,8,10: failure(23)
1,1,9,9: failure(24)
1,1,9,10: failure(25)
1,1,10,10: failure(26)
1,2,2,2: failure(27)
1,2,2,3: failure(28)
1,2,2,4: (2+1)*4*2=24
1,2,2,5: (5+1)*(2+2)=24
1,2,2,6: (6+2)*(2+1)=24
1,2,2,7: (7-1)*2*2=24
1,2,2,8: (2*2-1)*8=24
1,2,2,9: (9+2+1)*2=24
1,2,2,10: (10+2)*2*1=24
1,2,3,3: (3+1)*3*2=24
1,2,3,4: 4*3*2*1=24
1,2,3,5: (5+3)*(2+1)=24
1,2,3,6: (6+2)*3*1=24
1,2,3,7: 7*3+2+1=24
1,2,3,8: 8*3/(2-1)=24
1,2,3,9: (9+3)*2*1=24
1,2,3,10: (10+3-1)*2=24
1,2,4,4: (4+4)*(2+1)=24
1,2,4,5: (5+2-1)*4=24
1,2,4,6: 6*4/(2-1)=24
1,2,4,7: (7+4+1)*2=24
1,2,4,8: (8+4)*2*1=24
1,2,4,9: (9+4-1)*2=24
1,2,4,10: 10*2+4*1=24
1,2,5,5: 5*5-2+1=24
1,2,5,6: (6+5+1)*2=24
1,2,5,7: (7+5)*2*1=24
1,2,5,8: (8+5-1)*2=24
1,2,5,9: 9*2+5+1=24
1,2,5,10: 10*5/2-1=24
1,2,6,6: (6+6)*2*1=24
1,2,6,7: (7+6-1)*2=24
1,2,6,8: 8*6*1/2=24
1,2,6,9: 9*2+6*1=24
1,2,6,10: (10/2-1)*6=24
1,2,7,7: (7*7-1)/2=24
1,2,7,8: 8*2+7+1=24
1,2,7,9: 9*2+7-1=24
1,2,7,10: 10*1+7*2=24
1,2,8,8: 8*2+8*1=24
1,2,8,9: 9*8/(2+1)=24
1,2,8,10: (8-1)*2+10=24
1,2,9,9: failure(29)
1,2,9,10: failure(30)
1,2,10,10: failure(31)
1,3,3,3: (3+3)*(3+1)=24
1,3,3,4: (4+3+1)*3=24
1,3,3,5: (5+3)*3*1=24
1,3,3,6: (6+3-1)*3=24
1,3,3,7: 7*3+3*1=24
1,3,3,8: (8-1)*3+3=24
1,3,3,9: 9*3-3*1=24
1,3,3,10: (10-3+1)*3=24
1,3,4,4: (4+4)*3*1=24
1,3,4,5: 5*4+3+1=24
1,3,4,6: 6/(1-3/4)=24
1,3,4,7: 7*4-3-1=24
1,3,4,8: (8+4)*(3-1)=24
1,3,4,9: (9-3)*4*1=24
1,3,4,10: (10-3-1)*4=24
1,3,5,5: failure(32)
1,3,5,6: 6*3+5+1=24
1,3,5,7: (7+5)*(3-1)=24
1,3,5,8: (8-3)*5-1=24
1,3,5,9: (9-3)*(5-1)=24
1,3,5,10: 10*3-5-1=24
1,3,6,6: (6+6)*(3-1)=24
1,3,6,7: (7-3)*6*1=24
1,3,6,8: 8*6/(3-1)=24
1,3,6,9: (9/3+1)*6=24
1,3,6,10: 10*3-6*1=24
1,3,7,7: (7-3)*(7-1)=24
1,3,7,8: 3/(1-7/8)=24
1,3,7,9: (7+1)*9/3=24
1,3,7,10: 10*3-7+1=24
1,3,8,8: (8+1)*8/3=24
1,3,8,9: 9*8*1/3=24
1,3,8,10: (10-1)*8/3=24
1,3,9,9: (9-1)*9/3=24
1,3,9,10: (10+1)*3-9=24
1,3,10,10: 10+10+3+1=24
1,4,4,4: (4+4)*(4-1)=24
1,4,4,5: 5*4+4*1=24
1,4,4,6: (6-1)*4+4=24
1,4,4,7: 7*4-4*1=24
1,4,4,8: 8*1+4*4=24
1,4,4,9: (9-4+1)*4=24
1,4,4,10: (10-4)*4*1=24
1,4,5,5: 5*4+5-1=24
1,4,5,6: 4/(1-5/6)=24
1,4,5,7: 7*4-5+1=24
1,4,5,8: (5+1)*(8-4)=24
1,4,5,9: (9-4)*5-1=24
1,4,5,10: (10-5+1)*4=24
1,4,6,6: (4-1)*6+6=24
1,4,6,7: 4/(7/6-1)=24
1,4,6,8: (8-4)*6*1=24
1,4,6,9: (9-4-1)*6=24
1,4,6,10: (4-1)*10-6=24
1,4,7,7: (7+1)*(7-4)=24
1,4,7,8: (8-4)*(7-1)=24
1,4,7,9: (9-1)*(7-4)=24
1,4,7,10: failure(33)
1,4,8,8: 8*4-8*1=24
1,4,8,9: 9*8/(4-1)=24
1,4,8,10: failure(34)
1,4,9,9: failure(35)
1,4,9,10: 10+9+4+1=24
1,4,10,10: (10+10+4)*1=24
1,5,5,5: (5-1/5)*5=24
1,5,5,6: 6*5-5-1=24
1,5,5,7: failure(36)
1,5,5,8: failure(37)
1,5,5,9: (5+1)*(9-5)=24
1,5,5,10: (10-5)*5-1=24
1,5,6,6: 6*5-6*1=24
1,5,6,7: (7-1)*5-6=24
1,5,6,8: (8-5+1)*6=24
1,5,6,9: (9-5)*6*1=24
1,5,6,10: (10-5-1)*6=24
1,5,7,7: failure(38)
1,5,7,8: (7-5+1)*8=24
1,5,7,9: (9-5)*(7-1)=24
1,5,7,10: 7*5-10-1=24
1,5,8,8: (8-5)*8*1=24
1,5,8,9: (9-5-1)*8=24
1,5,8,10: 10+8+5+1=24
1,5,9,9: 9+9+5+1=24
1,5,9,10: (10+9+5)*1=24
1,5,10,10: 10+10+5-1=24
1,6,6,6: (6-1)*6-6=24
1,6,6,7: failure(39)
1,6,6,8: 6/(1-6/8)=24
1,6,6,9: (9-6+1)*6=24
1,6,6,10: (10-6)*6*1=24
1,6,7,7: failure(40)
1,6,7,8: failure(41)
1,6,7,9: (7+1)*(9-6)=24
1,6,7,10: 10+7+6+1=24
1,6,8,8: (8-6+1)*8=24
1,6,8,9: 9+8+6+1=24
1,6,8,10: (10+8+6)*1=24
1,6,9,9: (9+9+6)*1=24
1,6,9,10: 10+9+6-1=24
1,6,10,10: failure(42)
1,7,7,7: failure(43)
1,7,7,8: failure(44)
1,7,7,9: 9+7+7+1=24
1,7,7,10: (10+7+7)*1=24
1,7,8,8: 8+8+7+1=24
1,7,8,9: (9+8+7)*1=24
1,7,8,10: 10+8+7-1=24
1,7,9,9: 9+9+7-1=24
1,7,9,10: (10-7)*(9-1)=24
1,7,10,10: failure(45)
1,8,8,8: (8+8+8)*1=24
1,8,8,9: 9+8+8-1=24
1,8,8,10: (10-8+1)*8=24
1,8,9,9: failure(46)
1,8,9,10: failure(47)
1,8,10,10: failure(48)
1,9,9,9: failure(49)
1,9,9,10: failure(50)
1,9,10,10: failure(51)
1,10,10,10: failure(52)
2,2,2,2: failure(53)
2,2,2,3: 3*2*2*2=24
2,2,2,4: (4+2)*(2+2)=24
2,2,2,5: (5*2+2)*2=24
2,2,2,6: failure(54)
2,2,2,7: (7*2-2)*2=24
2,2,2,8: (8-2)*2*2=24
2,2,2,9: (9+2)*2+2=24
2,2,2,10: 10*2+2*2=24
2,2,3,3: (3+3)*(2+2)=24
2,2,3,4: (4+2+2)*3=24
2,2,3,5: (5*2-2)*3=24
2,2,3,6: (6-2)*3*2=24
2,2,3,7: (7+3+2)*2=24
2,2,3,8: 8*3*2/2=24
2,2,3,9: (9-3)*2*2=24
2,2,3,10: (10+3)*2-2=24
2,2,4,4: (4*2+4)*2=24
2,2,4,5: 5*4+2*2=24
2,2,4,6: (6+4+2)*2=24
2,2,4,7: 7*4-2*2=24
2,2,4,8: 8*2+4*2=24
2,2,4,9: (9+4)*2-2=24
2,2,4,10: (10-4)*2*2=24
2,2,5,5: 5*5-2/2=24
2,2,5,6: (6+5)*2+2=24
2,2,5,7: 7*2+5*2=24
2,2,5,8: (8+5)*2-2=24
2,2,5,9: (9+5-2)*2=24
2,2,5,10: (10*5-2)/2=24
2,2,6,6: 6*2+6*2=24
2,2,6,7: (7+6)*2-2=24
2,2,6,8: (8+6-2)*2=24
2,2,6,9: (9*2-6)*2=24
2,2,6,10: (10-2)*6/2=24
2,2,7,7: (7+7-2)*2=24
2,2,7,8: 7*2+8+2=24
2,2,7,9: failure(55)
2,2,7,10: (10/2+7)*2=24
2,2,8,8: (8/2+8)*2=24
2,2,8,9: 9*2+8-2=24
2,2,8,10: 10*2+8/2=24
2,2,9,9: failure(56)
2,2,9,10: (9-2)*2+10=24
2,2,10,10: 10+10+2+2=24
2,3,3,3: (3*3+3)*2=24
2,3,3,4: failure(57)
2,3,3,5: (5*3-3)*2=24
2,3,3,6: 6*3+3*2=24
2,3,3,7: (7-3)*3*2=24
2,3,3,8: 8*3/(3-2)=24
2,3,3,9: (9-3+2)*3=24
2,3,3,10: 10*3-3*2=24
2,3,4,4: 4*4*3/2=24
2,3,4,5: (5+4+3)*2=24
2,3,4,6: 6*4/(3-2)=24
2,3,4,7: (7-3+2)*4=24
2,3,4,8: (8-4)*3*2=24
2,3,4,9: 9*4*2/3=24
2,3,4,10: (10-4+2)*3=24
2,3,5,5: 5*5-3+2=24
2,3,5,6: 6*5-3*2=24
2,3,5,7: 7*3+5-2=24
2,3,5,8: 8*2+5+3=24
2,3,5,9: (9-5)*3*2=24
2,3,5,10: (10+5-3)*2=24
2,3,6,6: 6*6*2/3=24
2,3,6,7: 7*6/2+3=24
2,3,6,8: (8-2)*3+6=24
2,3,6,9: (9+6-3)*2=24
2,3,6,10: (10-6)*3*2=24
2,3,7,7: 7*2+7+3=24
2,3,7,8: (8+7-3)*2=24
2,3,7,9: (9+7)*3/2=24
2,3,7,10: (10*7+2)/3=24
2,3,8,8: (8+8)*3/2=24
2,3,8,9: (9-3)*8/2=24
2,3,8,10: 10*3-8+2=24
2,3,9,9: (9/3+9)*2=24
2,3,9,10: 10+9+3+2=24
2,3,10,10: (10-3)*2+10=24
2,4,4,4: 4*4+4*2=24
2,4,4,5: (5*2-4)*4=24
2,4,4,6: (6+4)*2+4=24
2,4,4,7: (7-4)*4*2=24
2,4,4,8: 8*4-4*2=24
2,4,4,9: (9-2)*4-4=24
2,4,4,10: 10*4/2+4=24
2,4,5,5: (5+5)*2+4=24
2,4,5,6: 6*5-4-2=24
2,4,5,7: (7+5)*(4-2)=24
2,4,5,8: (8-5)*4*2=24
2,4,5,9: (9-5+2)*4=24
2,4,5,10: 5*2+10+4=24
2,4,6,6: (6+6)*(4-2)=24
2,4,6,7: 7*4-6+2=24
2,4,6,8: 8*6/(4-2)=24
2,4,6,9: (9-6)*4*2=24
2,4,6,10: (10+6-4)*2=24
2,4,7,7: (7+7)*2-4=24
2,4,7,8: 8*7/2-4=24
2,4,7,9: (9+7-4)*2=24
2,4,7,10: (10-7)*4*2=24
2,4,8,8: (8+8-4)*2=24
2,4,8,9: (9-4-2)*8=24
2,4,8,10: 10+8+4+2=24
2,4,9,9: 9+9+4+2=24
2,4,9,10: 9*4-10-2=24
2,4,10,10: (4/10+2)*10=24
2,5,5,5: failure(58)
2,5,5,6: failure(59)
2,5,5,7: 7*2+5+5=24
2,5,5,8: (5/5+2)*8=24
2,5,5,9: 5*2+9+5=24
2,5,5,10: (5-2/10)*5=24
2,5,6,6: (5*2-6)*6=24
2,5,6,7: (7-5)*6*2=24
2,5,6,8: (8-2)*5-6=24
2,5,6,9: 6*5/2+9=24
2,5,6,10: 10*6*2/5=24
2,5,7,7: 5*2+7+7=24
2,5,7,8: (5*2-7)*8=24
2,5,7,9: 7*5-9-2=24
2,5,7,10: (10+7-5)*2=24
2,5,8,8: 8*5-8*2=24
2,5,8,9: 9*8/(5-2)=24
2,5,8,10: (10-5-2)*8=24
2,5,9,9: failure(60)
2,5,9,10: 10*2+9-5=24
2,5,10,10: (10/5+10)*2=24
2,6,6,6: 6*6-6*2=24
2,6,6,7: (7*6+6)/2=24
2,6,6,8: (8-6)*6*2=24
2,6,6,9: (9*6-6)/2=24
2,6,6,10: 10+6+6+2=24
2,6,7,7: failure(61)
2,6,7,8: (8+7)*2-6=24
2,6,7,9: (9-7)*6*2=24
2,6,7,10: (7*2-10)*6=24
2,6,8,8: 8+8+6+2=24
2,6,8,9: 9*8*2/6=24
2,6,8,10: (10-8)*6*2=24
2,6,9,9: (9+9-6)*2=24
2,6,9,10: (10-2)*(9-6)=24
2,6,10,10: 10+10+6-2=24
2,7,7,7: failure(62)
2,7,7,8: 8+7+7+2=24
2,7,7,9: failure(63)
2,7,7,10: (10/7+2)*7=24
2,7,8,8: (8*7-8)/2=24
2,7,8,9: (9+7)*2-8=24
2,7,8,10: failure(64)
2,7,9,9: failure(65)
2,7,9,10: (10+9-7)*2=24
2,7,10,10: (10-7)*(10-2)=24
2,8,8,8: (8/8+2)*8=24
2,8,8,9: (9-8+2)*8=24
2,8,8,10: 10+8+8-2=24
2,8,9,9: 9+9+8-2=24
2,8,9,10: (10-9+2)*8=24
2,8,10,10: (10+10-8)*2=24
2,9,9,9: failure(66)
2,9,9,10: failure(67)
2,9,10,10: 10/2+10+9=24
2,10,10,10: failure(68)
3,3,3,3: 3*3*3-3=24
3,3,3,4: (4+3)*3+3=24
3,3,3,5: 5*3+3*3=24
3,3,3,6: 6*3+3+3=24
3,3,3,7: (3+3)*(7-3)=24
3,3,3,8: 8*3*3/3=24
3,3,3,9: (9-3/3)*3=24
3,3,3,10: (10-3)*3+3=24
3,3,4,4: 4*3+4*3=24
3,3,4,5: (5+4)*3-3=24
3,3,4,6: 6*4*3/3=24
3,3,4,7: (7+4-3)*3=24
3,3,4,8: 8*3/(4-3)=24
3,3,4,9: (9-4+3)*3=24
3,3,4,10: failure(69)
3,3,5,5: 5*5-3/3=24
3,3,5,6: (6+5-3)*3=24
3,3,5,7: (5*3-7)*3=24
3,3,5,8: failure(70)
3,3,5,9: (9+3)*(5-3)=24
3,3,5,10: (10-5+3)*3=24
3,3,6,6: (6/3+6)*3=24
3,3,6,7: 7*3+6-3=24
3,3,6,8: (6+3)*8/3=24
3,3,6,9: 9*3-6+3=24
3,3,6,10: (10-3-3)*6=24
3,3,7,7: (3/7+3)*7=24
3,3,7,8: 3*3+8+7=24
3,3,7,9: 9*7/3+3=24
3,3,7,10: failure(71)
3,3,8,8: 8/(3-8/3)=24
3,3,8,9: (9-3-3)*8=24
3,3,8,10: 10+8+3+3=24
3,3,9,9: 9+9+3+3=24
3,3,9,10: 10*3-9+3=24
3,3,10,10: failure(72)
3,4,4,4: (4+3)*4-4=24
3,4,4,5: (5+4-3)*4=24
3,4,4,6: 6*4/(4-3)=24
3,4,4,7: (7-4+3)*4=24
3,4,4,8: 8*4*3/4=24
3,4,4,9: 9*4-4*3=24
3,4,4,10: (10-3)*4-4=24
3,4,5,5: 5*5-4+3=24
3,4,5,6: (5-4+3)*6=24
3,4,5,7: (7-5)*4*3=24
3,4,5,8: (8-5+3)*4=24
3,4,5,9: (9-5+4)*3=24
3,4,5,10: 10*4*3/5=24
3,4,6,6: 6*6-4*3=24
3,4,6,7: failure(73)
3,4,6,8: (8-6)*4*3=24
3,4,6,9: (9-6+3)*4=24
3,4,6,10: (10-6+4)*3=24
3,4,7,7: (7-4)*7+3=24
3,4,7,8: (7-3)*4+8=24
3,4,7,9: (9-7)*4*3=24
3,4,7,10: 10+7+4+3=24
3,4,8,8: failure(74)
3,4,8,9: 9+8+4+3=24
3,4,8,10: (10-8)*4*3=24
3,4,9,9: (9+9)*4/3=24
3,4,9,10: failure(75)
3,4,10,10: 10*3-10+4=24
3,5,5,5: failure(76)
3,5,5,6: (5/5+3)*6=24
3,5,5,7: (7+5)*(5-3)=24
3,5,5,8: 8*5*3/5=24
3,5,5,9: (9/5+3)*5=24
3,5,5,10: failure(77)
3,5,6,6: (6+6)*(5-3)=24
3,5,6,7: (7+6-5)*3=24
3,5,6,8: 8*6/(5-3)=24
3,5,6,9: (9-6+5)*3=24
3,5,6,10: 10+6+5+3=24
3,5,7,7: failure(78)
3,5,7,8: (8-5)*7+3=24
3,5,7,9: 9+7+5+3=24
3,5,7,10: (10-7+5)*3=24
3,5,8,8: 8+8+5+3=24
3,5,8,9: 9*3-8+5=24
3,5,8,10: failure(79)
3,5,9,9: (9-5)*(9-3)=24
3,5,9,10: (10-5)*3+9=24
3,5,10,10: (10-10/5)*3=24
3,6,6,6: (6+6)*6/3=24
3,6,6,7: 7*6-6*3=24
3,6,6,8: 8*6*3/6=24
3,6,6,9: 9+6+6+3=24
3,6,6,10: (6-3)*10-6=24
3,6,7,7: (7+7-6)*3=24
3,6,7,8: 8+7+6+3=24
3,6,7,9: (9-7+6)*3=24
3,6,7,10: 7*6/3+10=24
3,6,8,8: (8/8+3)*6=24
3,6,8,9: 9*8/(6-3)=24
3,6,8,10: (10-8+6)*3=24
3,6,9,9: (9/9+3)*6=24
3,6,9,10: (10-9+3)*6=24
3,6,10,10: (10/10+3)*6=24
3,7,7,7: (7/7+7)*3=24
3,7,7,8: 8*7*3/7=24
3,7,7,9: (9-7/7)*3=24
3,7,7,10: (10-7)*7+3=24
3,7,8,8: (8/8+7)*3=24
3,7,8,9: (9-8+7)*3=24
3,7,8,10: failure(80)
3,7,9,9: (9/9+7)*3=24
3,7,9,10: (10-9+7)*3=24
3,7,10,10: (10/10+7)*3=24
3,8,8,8: 8*8*3/8=24
3,8,8,9: (9-8)*8*3=24
3,8,8,10: (10*8-8)/3=24
3,8,9,9: 9*8*3/9=24
3,8,9,10: (10-9)*8*3=24
3,8,10,10: 10*8*3/10=24
3,9,9,9: (9-9/9)*3=24
3,9,9,10: (9+9-10)*3=24
3,9,10,10: (9-10/10)*3=24
3,10,10,10: failure(81)
4,4,4,4: 4*4+4+4=24
4,4,4,5: (4/4+5)*4=24
4,4,4,6: 6*4*4/4=24
4,4,4,7: (4+4)*(7-4)=24
4,4,4,8: (8/4+4)*4=24
4,4,4,9: (9-4)*4+4=24
4,4,4,10: 10*4-4*4=24
4,4,5,5: 5*5-4/4=24
4,4,5,6: 6*4/(5-4)=24
4,4,5,7: (7-5+4)*4=24
4,4,5,8: 8*5-4*4=24
4,4,5,9: failure(82)
4,4,5,10: (10/5+4)*4=24
4,4,6,6: failure(83)
4,4,6,7: failure(84)
4,4,6,8: (8-6+4)*4=24
4,4,6,9: 9*4*4/6=24
4,4,6,10: 10+6+4+4=24
4,4,7,7: (4-4/7)*7=24
4,4,7,8: (8-4)*7-4=24
4,4,7,9: (9-7+4)*4=24
4,4,7,10: (4+4)*(10-7)=24
4,4,8,8: 8+8+4+4=24
4,4,8,9: 9*4-8-4=24
4,4,8,10: (10-8+4)*4=24
4,4,9,9: failure(85)
4,4,9,10: failure(86)
4,4,10,10: (10*10-4)/4=24
4,5,5,5: (5/5+5)*4=24
4,5,5,6: 6*5*4/5=24
4,5,5,7: (7-5/5)*4=24
4,5,5,8: (4-5/5)*8=24
4,5,5,9: (9-5)*5+4=24
4,5,5,10: 10+5+5+4=24
4,5,6,6: (6/6+5)*4=24
4,5,6,7: (7-6+5)*4=24
4,5,6,8: (5+4-6)*8=24
4,5,6,9: 9+6+5+4=24
4,5,6,10: (10-6)*5+4=24
4,5,7,7: (7/7+5)*4=24
4,5,7,8: (8-7+5)*4=24
4,5,7,9: (9-5)*7-4=24
4,5,7,10: (7-5)*10+4=24
4,5,8,8: (8/8+5)*4=24
4,5,8,9: (9-8+5)*4=24
4,5,8,10: (8-10/5)*4=24
4,5,9,9: (9/9+5)*4=24
4,5,9,10: (10-9+5)*4=24
4,5,10,10: (10/10+5)*4=24
4,6,6,6: (6+6)*(6-4)=24
4,6,6,7: (7-6)*6*4=24
4,6,6,8: 8*6-6*4=24
4,6,6,9: (9-4)*6-6=24
4,6,6,10: (10+6)*6/4=24
4,6,7,7: 7*6*4/7=24
4,6,7,8: (8-7)*6*4=24
4,6,7,9: (9+7)*6/4=24
4,6,7,10: (10-6)*7-4=24
4,6,8,8: 8*6*4/8=24
4,6,8,9: (9-8)*6*4=24
4,6,8,10: (10-6)*4+8=24
4,6,9,9: 9*6*4/9=24
4,6,9,10: (10-9)*6*4=24
4,6,10,10: 10*6*4/10=24
4,7,7,7: (7-7/7)*4=24
4,7,7,8: (7+7-8)*4=24
4,7,7,9: failure(87)
4,7,7,10: failure(88)
4,7,8,8: (7-8/8)*4=24
4,7,8,9: 9*8/(7-4)=24
4,7,8,10: 8*7/4+10=24
4,7,9,9: (7-9/9)*4=24
4,7,9,10: 10*4-9-7=24
4,7,10,10: (7-10/10)*4=24
4,8,8,8: (4-8/8)*8=24
4,8,8,9: (8+4-9)*8=24
4,8,8,10: 10*4-8-8=24
4,8,9,9: (4-9/9)*8=24
4,8,9,10: (9+4-10)*8=24
4,8,10,10: 10+10+8-4=24
4,9,9,9: failure(89)
4,9,9,10: 10+9+9-4=24
4,9,10,10: failure(90)
4,10,10,10: failure(91)
5,5,5,5: 5*5-5/5=24
5,5,5,6: 5*5-6+5=24
5,5,5,7: failure(92)
5,5,5,8: failure(93)
5,5,5,9: 9+5+5+5=24
5,5,5,10: failure(94)
5,5,6,6: (6-6/5)*5=24
5,5,6,7: 7*5-6-5=24
5,5,6,8: 8+6+5+5=24
5,5,6,9: failure(95)
5,5,6,10: failure(96)
5,5,7,7: 7*7-5*5=24
5,5,7,8: 5*5-8+7=24
5,5,7,9: failure(97)
5,5,7,10: (7+5)*10/5=24
5,5,8,8: 5*5-8/8=24
5,5,8,9: (8-5)*5+9=24
5,5,8,10: (10+5)*8/5=24
5,5,9,9: 5*5-9/9=24
5,5,9,10: 5*5-10+9=24
5,5,10,10: 5*5-10/10=24
5,6,6,6: (5-6/6)*6=24
5,6,6,7: 7+6+6+5=24
5,6,6,8: (8-5)*6+6=24
5,6,6,9: 9*6-6*5=24
5,6,6,10: (6-10/5)*6=24
5,6,7,7: (5-7/7)*6=24
5,6,7,8: 8*6/(7-5)=24
5,6,7,9: (7-5)*9+6=24
5,6,7,10: failure(98)
5,6,8,8: (5-8/8)*6=24
5,6,8,9: (9+6)*8/5=24
5,6,8,10: 8*6*5/10=24
5,6,9,9: (5-9/9)*6=24
5,6,9,10: 10*9/5+6=24
5,6,10,10: (10+10)*6/5=24
5,7,7,7: failure(99)
5,7,7,8: failure(100)
5,7,7,9: (7+5)*(9-7)=24
5,7,7,10: (7-5)*7+10=24
5,7,8,8: (8+7)*8/5=24
5,7,8,9: 8*5-9-7=24
5,7,8,10: (7+5)*(10-8)=24
5,7,9,9: failure(101)
5,7,9,10: (10-7)*5+9=24
5,7,10,10: 10*7/5+10=24
5,8,8,8: 8*8-8*5=24
5,8,8,9: 9*8/(8-5)=24
5,8,8,10: 10*8/5+8=24
5,8,9,9: failure(102)
5,8,9,10: failure(103)
5,8,10,10: failure(104)
5,9,9,9: failure(105)
5,9,9,10: failure(106)
5,9,10,10: 10+10+9-5=24
5,10,10,10: failure(107)
6,6,6,6: 6+6+6+6=24
6,6,6,7: failure(108)
6,6,6,8: (6+6)*(8-6)=24
6,6,6,9: (9-6)*6+6=24
6,6,6,10: 10*6-6*6=24
6,6,7,7: failure(109)
6,6,7,8: failure(110)
6,6,7,9: (7+6-9)*6=24
6,6,7,10: (10-7)*6+6=24
6,6,8,8: 8*6/(8-6)=24
6,6,8,9: (8-6)*9+6=24
6,6,8,10: (8+6-10)*6=24
6,6,9,9: failure(111)
6,6,9,10: (10+6)*9/6=24
6,6,10,10: failure(112)
6,7,7,7: failure(113)
6,7,7,8: failure(114)
6,7,7,9: failure(115)
6,7,7,10: (7+7-10)*6=24
6,7,8,8: failure(116)
6,7,8,9: 8*6/(9-7)=24
6,7,8,10: (8-6)*7+10=24
6,7,9,9: (9-7)*9+6=24
6,7,9,10: failure(117)
6,7,10,10: (10-7)*10-6=24
6,8,8,8: (8-6)*8+8=24
6,8,8,9: 9*8-8*6=24
6,8,8,10: (10+8)*8/6=24
6,8,9,9: (9+9)*8/6=24
6,8,9,10: (10-8)*9+6=24
6,8,10,10: failure(118)
6,9,9,9: failure(119)
6,9,9,10: 10*9/6+9=24
6,9,10,10: failure(120)
6,10,10,10: 10+10+10-6=24
7,7,7,7: failure(121)
7,7,7,8: failure(122)
7,7,7,9: failure(123)
7,7,7,10: failure(124)
7,7,8,8: failure(125)
7,7,8,9: failure(126)
7,7,8,10: failure(127)
7,7,9,9: failure(128)
7,7,9,10: (9-7)*7+10=24
7,7,10,10: failure(129)
7,8,8,8: failure(130)
7,8,8,9: (9-7)*8+8=24
7,8,8,10: 10*8-8*7=24
7,8,9,9: failure(131)
7,8,9,10: 9*8/(10-7)=24
7,8,10,10: (10-8)*7+10=24
7,9,9,9: failure(132)
7,9,9,10: failure(133)
7,9,10,10: failure(134)
7,10,10,10: failure(135)
8,8,8,8: failure(136)
8,8,8,9: failure(137)
8,8,8,10: (10-8)*8+8=24
8,8,9,9: failure(138)
8,8,9,10: failure(139)
8,8,10,10: failure(140)
8,9,9,9: failure(141)
8,9,9,10: failure(142)
8,9,10,10: failure(143)
8,10,10,10: failure(144)
9,9,9,9: failure(145)
9,9,9,10: failure(146)
9,9,10,10: failure(147)
9,10,10,10: failure(148)
10,10,10,10: failure(149)

2010-11-11 18:24
yu_hua
Rank: 2
等 级:论坛游民
帖 子:222
专家分:95
注 册:2006-8-10
收藏
得分:0 
以下是引用御坂美琴在2010-11-11 18:29:15的发言:

不错,但我小学玩这个游戏的时候,还是喜欢把JQK加上当11,12,13,这样变化更丰富,但即使这样,计算速度依然神速(平均1-2秒!但不是说我,我比较菜)
谢谢斑竹赞许。如果要搜索4个 1~13 之间的整数实现“24”的可能性,只要将
1楼代码中的四重循环上限
    for(card[0]=      1; card[0]<=10; card[0]++)
    for(card[1]=card[0]; card[1]<=10; card[1]++)
    for(card[2]=card[1]; card[2]<=10; card[2]++)
    for(card[3]=card[2]; card[3]<=10; card[3]++)
10 提升到 13 即可
    for(card[0]=      1; card[0]<=13; card[0]++)
    for(card[1]=card[0]; card[1]<=13; card[1]++)
    for(card[2]=card[1]; card[2]<=13; card[2]++)
    for(card[3]=card[2]; card[3]<=13; card[3]++)

2010-11-11 19:08
yu_hua
Rank: 2
等 级:论坛游民
帖 子:222
专家分:95
注 册:2006-8-10
收藏
得分:0 
如果把24点游戏延伸到1~13之间的4个整数,则运行结果表明
共有1820组可能的“出牌”,其中458组无法产生“24”点。
1,1,1,1: failure(1)
1,1,1,2: failure(2)
1,1,1,3: failure(3)
1,1,1,4: failure(4)
1,1,1,5: failure(5)
1,1,1,6: failure(6)
1,1,1,7: failure(7)
1,1,1,8: (1+1+1)*8=24
1,1,1,9: failure(8)
1,1,1,10: failure(9)
1,1,1,11: (11+1)*(1+1)=24
1,1,1,12: (1+1)*12*1=24
1,1,1,13: (1+1)*(13-1)=24
1,1,2,2: failure(10)
1,1,2,3: failure(11)
1,1,2,4: failure(12)
1,1,2,5: failure(13)
1,1,2,6: (2+1+1)*6=24
1,1,2,7: (7+1)*(2+1)=24
1,1,2,8: (2+1)*8*1=24
1,1,2,9: (2+1)*(9-1)=24
1,1,2,10: (10+2)*(1+1)=24
1,1,2,11: 11*2+1+1=24
1,1,2,12: 12*2*1*1=24
1,1,2,13: 13*2-1-1=24
1,1,3,3: failure(14)
1,1,3,4: (1+1)*4*3=24
1,1,3,5: (5+1)*(3+1)=24
1,1,3,6: (6+1+1)*3=24
1,1,3,7: (7+1)*3*1=24
1,1,3,8: 8*3*1*1=24
1,1,3,9: (9+3)*(1+1)=24
1,1,3,10: (10-1-1)*3=24
1,1,3,11: (11+1)*(3-1)=24
1,1,3,12: (3-1)*12*1=24
1,1,3,13: (13-1)*(3-1)=24
1,1,4,4: (4+1+1)*4=24
1,1,4,5: (5+1)*4*1=24
1,1,4,6: 6*4*1*1=24
1,1,4,7: (7+1)*(4-1)=24
1,1,4,8: (8+4)*(1+1)=24
1,1,4,9: (9-1)*(4-1)=24
1,1,4,10: (1+1)*10+4=24
1,1,4,11: failure(15)
1,1,4,12: 12*4/(1+1)=24
1,1,4,13: failure(16)
1,1,5,5: 5*5-1*1=24
1,1,5,6: (6-1)*5-1=24
1,1,5,7: (7+5)*(1+1)=24
1,1,5,8: (5-1-1)*8=24
1,1,5,9: failure(17)
1,1,5,10: failure(18)
1,1,5,11: failure(19)
1,1,5,12: failure(20)
1,1,5,13: failure(21)
1,1,6,6: (6+6)*(1+1)=24
1,1,6,7: failure(22)
1,1,6,8: 8*6/(1+1)=24
1,1,6,9: (1+1)*9+6=24
1,1,6,10: failure(23)
1,1,6,11: failure(24)
1,1,6,12: (1+1)*6+12=24
1,1,6,13: failure(25)
1,1,7,7: failure(26)
1,1,7,8: failure(27)
1,1,7,9: failure(28)
1,1,7,10: (1+1)*7+10=24
1,1,7,11: failure(29)
1,1,7,12: failure(30)
1,1,7,13: failure(31)
1,1,8,8: (1+1)*8+8=24
1,1,8,9: failure(32)
1,1,8,10: failure(33)
1,1,8,11: failure(34)
1,1,8,12: failure(35)
1,1,8,13: failure(36)
1,1,9,9: failure(37)
1,1,9,10: failure(38)
1,1,9,11: failure(39)
1,1,9,12: failure(40)
1,1,9,13: 13+9+1+1=24
1,1,10,10: failure(41)
1,1,10,11: failure(42)
1,1,10,12: 12+10+1+1=24
1,1,10,13: (13+10+1)*1=24
1,1,11,11: 11+11+1+1=24
1,1,11,12: (12+11+1)*1=24
1,1,11,13: (13+11)*1*1=24
1,1,12,12: (12+12)*1*1=24
1,1,12,13: (13+12-1)*1=24
1,1,13,13: 13+13-1-1=24
1,2,2,2: failure(43)
1,2,2,3: failure(44)
1,2,2,4: (2+1)*4*2=24
1,2,2,5: (5+1)*(2+2)=24
1,2,2,6: (6+2)*(2+1)=24
1,2,2,7: (7-1)*2*2=24
1,2,2,8: (2*2-1)*8=24
1,2,2,9: (9+2+1)*2=24
1,2,2,10: (10+2)*2*1=24
1,2,2,11: 11*2+2*1=24
1,2,2,12: 12*2/(2-1)=24
1,2,2,13: 13*2-2*1=24
1,2,3,3: (3+1)*3*2=24
1,2,3,4: 4*3*2*1=24
1,2,3,5: (5+3)*(2+1)=24
1,2,3,6: (6+2)*3*1=24
1,2,3,7: 7*3+2+1=24
1,2,3,8: 8*3/(2-1)=24
1,2,3,9: (9+3)*2*1=24
1,2,3,10: (10+3-1)*2=24
1,2,3,11: 11*2+3-1=24
1,2,3,12: (3-2+1)*12=24
1,2,3,13: 13*2-3+1=24
1,2,4,4: (4+4)*(2+1)=24
1,2,4,5: (5+2-1)*4=24
1,2,4,6: 6*4/(2-1)=24
1,2,4,7: (7+4+1)*2=24
1,2,4,8: (8+4)*2*1=24
1,2,4,9: (9+4-1)*2=24
1,2,4,10: 10*2+4*1=24
1,2,4,11: (11+1)*(4-2)=24
1,2,4,12: 12*4*1/2=24
1,2,4,13: (13-1)*(4-2)=24
1,2,5,5: 5*5-2+1=24
1,2,5,6: (6+5+1)*2=24
1,2,5,7: (7+5)*2*1=24
1,2,5,8: (8+5-1)*2=24
1,2,5,9: 9*2+5+1=24
1,2,5,10: 10*5/2-1=24
1,2,5,11: failure(45)
1,2,5,12: (5-2-1)*12=24
1,2,5,13: 5*2+13+1=24
1,2,6,6: (6+6)*2*1=24
1,2,6,7: (7+6-1)*2=24
1,2,6,8: 8*6*1/2=24
1,2,6,9: 9*2+6*1=24
1,2,6,10: (10/2-1)*6=24
1,2,6,11: 6*2+11+1=24
1,2,6,12: 12*6/(2+1)=24
1,2,6,13: 6*2+13-1=24
1,2,7,7: (7*7-1)/2=24
1,2,7,8: 8*2+7+1=24
1,2,7,9: 9*2+7-1=24
1,2,7,10: 10*1+7*2=24
1,2,7,11: 7*2+11-1=24
1,2,7,12: (7-1)*2+12=24
1,2,7,13: failure(46)
1,2,8,8: 8*2+8*1=24
1,2,8,9: 9*8/(2+1)=24
1,2,8,10: (8-1)*2+10=24
1,2,8,11: failure(47)
1,2,8,12: failure(48)
1,2,8,13: 13+8+2+1=24
1,2,9,9: failure(49)
1,2,9,10: failure(50)
1,2,9,11: (2+1)*11-9=24
1,2,9,12: 12+9+2+1=24
1,2,9,13: (13+9+2)*1=24
1,2,10,10: failure(51)
1,2,10,11: 11+10+2+1=24
1,2,10,12: (12+10+2)*1=24
1,2,10,13: 13+10+2-1=24
1,2,11,11: (11+11+2)*1=24
1,2,11,12: 12+11+2-1=24
1,2,11,13: (13+11)*(2-1)=24
1,2,12,12: (12+12)*(2-1)=24
1,2,12,13: 13+12-2+1=24
1,2,13,13: (13+13-2)*1=24
1,3,3,3: (3+3)*(3+1)=24
1,3,3,4: (4+3+1)*3=24
1,3,3,5: (5+3)*3*1=24
1,3,3,6: (6+3-1)*3=24
1,3,3,7: 7*3+3*1=24
1,3,3,8: (8-1)*3+3=24
1,3,3,9: 9*3-3*1=24
1,3,3,10: (10-3+1)*3=24
1,3,3,11: (11-3)*3*1=24
1,3,3,12: (12-3-1)*3=24
1,3,3,13: failure(52)
1,3,4,4: (4+4)*3*1=24
1,3,4,5: 5*4+3+1=24
1,3,4,6: 6/(1-3/4)=24
1,3,4,7: 7*4-3-1=24
1,3,4,8: (8+4)*(3-1)=24
1,3,4,9: (9-3)*4*1=24
1,3,4,10: (10-3-1)*4=24
1,3,4,11: (11-4+1)*3=24
1,3,4,12: 12*4/(3-1)=24
1,3,4,13: (13-4-1)*3=24
1,3,5,5: failure(53)
1,3,5,6: 6*3+5+1=24
1,3,5,7: (7+5)*(3-1)=24
1,3,5,8: (8-3)*5-1=24
1,3,5,9: (9-3)*(5-1)=24
1,3,5,10: 10*3-5-1=24
1,3,5,11: (11+1)*(5-3)=24
1,3,5,12: (12-5+1)*3=24
1,3,5,13: (13-5)*3*1=24
1,3,6,6: (6+6)*(3-1)=24
1,3,6,7: (7-3)*6*1=24
1,3,6,8: 8*6/(3-1)=24
1,3,6,9: (9/3+1)*6=24
1,3,6,10: 10*3-6*1=24
1,3,6,11: (11+1)*6/3=24
1,3,6,12: 12*6*1/3=24
1,3,6,13: (13-6+1)*3=24
1,3,7,7: (7-3)*(7-1)=24
1,3,7,8: 3/(1-7/8)=24
1,3,7,9: (7+1)*9/3=24
1,3,7,10: 10*3-7+1=24
1,3,7,11: failure(54)
1,3,7,12: (7-1)*12/3=24
1,3,7,13: 13+7+3+1=24
1,3,8,8: (8+1)*8/3=24
1,3,8,9: 9*8*1/3=24
1,3,8,10: (10-1)*8/3=24
1,3,8,11: 11*3-8-1=24
1,3,8,12: 12*8/(3+1)=24
1,3,8,13: (13+8+3)*1=24
1,3,9,9: (9-1)*9/3=24
1,3,9,10: (10+1)*3-9=24
1,3,9,11: 11+9+3+1=24
1,3,9,12: (12+9+3)*1=24
1,3,9,13: 13+9+3-1=24
1,3,10,10: 10+10+3+1=24
1,3,10,11: (11+10+3)*1=24
1,3,10,12: 12+10+3-1=24
1,3,10,13: failure(55)
1,3,11,11: 11+11+3-1=24
1,3,11,12: 12*3-11-1=24
1,3,11,13: failure(56)
1,3,12,12: 12*3-12*1=24
1,3,12,13: (13-1)*3-12=24
1,3,13,13: 13+13-3+1=24
1,4,4,4: (4+4)*(4-1)=24
1,4,4,5: 5*4+4*1=24
1,4,4,6: (6-1)*4+4=24
1,4,4,7: 7*4-4*1=24
1,4,4,8: 8*1+4*4=24
1,4,4,9: (9-4+1)*4=24
1,4,4,10: (10-4)*4*1=24
1,4,4,11: (11-4-1)*4=24
1,4,4,12: (12-4)*(4-1)=24
1,4,4,13: failure(57)
1,4,5,5: 5*4+5-1=24
1,4,5,6: 4/(1-5/6)=24
1,4,5,7: 7*4-5+1=24
1,4,5,8: (5+1)*(8-4)=24
1,4,5,9: (9-4)*5-1=24
1,4,5,10: (10-5+1)*4=24
1,4,5,11: (11-5)*4*1=24
1,4,5,12: (12-5-1)*4=24
1,4,5,13: (13-5)*(4-1)=24
1,4,6,6: (4-1)*6+6=24
1,4,6,7: 4/(7/6-1)=24
1,4,6,8: (8-4)*6*1=24
1,4,6,9: (9-4-1)*6=24
1,4,6,10: (4-1)*10-6=24
1,4,6,11: (11-6+1)*4=24
1,4,6,12: 12*6/(4-1)=24
1,4,6,13: 13+6+4+1=24
1,4,7,7: (7+1)*(7-4)=24
1,4,7,8: (8-4)*(7-1)=24
1,4,7,9: (9-1)*(7-4)=24
1,4,7,10: failure(58)
1,4,7,11: (4+1)*7-11=24
1,4,7,12: 12+7+4+1=24
1,4,7,13: (13-7)*4*1=24
1,4,8,8: 8*4-8*1=24
1,4,8,9: 9*8/(4-1)=24
1,4,8,10: failure(59)
1,4,8,11: 11+8+4+1=24
1,4,8,12: (12+8+4)*1=24
1,4,8,13: 13+8+4-1=24
1,4,9,9: failure(60)
1,4,9,10: 10+9+4+1=24
1,4,9,11: (11+9+4)*1=24
1,4,9,12: 12+9+4-1=24
1,4,9,13: 9*4-13+1=24
1,4,10,10: (10+10+4)*1=24
1,4,10,11: 11+10+4-1=24
1,4,10,12: 12*10/(4+1)=24
1,4,10,13: failure(61)
1,4,11,11: failure(62)
1,4,11,12: failure(63)
1,4,11,13: failure(64)
1,4,12,12: (12/4-1)*12=24
1,4,12,13: failure(65)
1,4,13,13: failure(66)
1,5,5,5: (5-1/5)*5=24
1,5,5,6: 6*5-5-1=24
1,5,5,7: failure(67)
1,5,5,8: failure(68)
1,5,5,9: (5+1)*(9-5)=24
1,5,5,10: (10-5)*5-1=24
1,5,5,11: (11-5)*(5-1)=24
1,5,5,12: (5/5+1)*12=24
1,5,5,13: 13+5+5+1=24
1,5,6,6: 6*5-6*1=24
1,5,6,7: (7-1)*5-6=24
1,5,6,8: (8-5+1)*6=24
1,5,6,9: (9-5)*6*1=24
1,5,6,10: (10-5-1)*6=24
1,5,6,11: (11-6)*5-1=24
1,5,6,12: (12-6)*(5-1)=24
1,5,6,13: (13+6+5)*1=24
1,5,7,7: failure(69)
1,5,7,8: (7-5+1)*8=24
1,5,7,9: (9-5)*(7-1)=24
1,5,7,10: 7*5-10-1=24
1,5,7,11: 11+7+5+1=24
1,5,7,12: (12+7+5)*1=24
1,5,7,13: (13-7)*(5-1)=24
1,5,8,8: (8-5)*8*1=24
1,5,8,9: (9-5-1)*8=24
1,5,8,10: 10+8+5+1=24
1,5,8,11: (11+8+5)*1=24
1,5,8,12: 12*8/(5-1)=24
1,5,8,13: (13-8)*5-1=24
1,5,9,9: 9+9+5+1=24
1,5,9,10: (10+9+5)*1=24
1,5,9,11: 11+9+5-1=24
1,5,9,12: (9+1)*12/5=24
1,5,9,13: (5+1)*(13-9)=24
1,5,10,10: 10+10+5-1=24
1,5,10,11: (11+1)*10/5=24
1,5,10,12: 12*10*1/5=24
1,5,10,13: (13-1)*10/5=24
1,5,11,11: (11*11-1)/5=24
1,5,11,12: (11-1)*12/5=24
1,5,11,13: failure(70)
1,5,12,12: 12*12/(5+1)=24
1,5,12,13: failure(71)
1,5,13,13: failure(72)
1,6,6,6: (6-1)*6-6=24
1,6,6,7: failure(73)
1,6,6,8: 6/(1-6/8)=24
1,6,6,9: (9-6+1)*6=24
1,6,6,10: (10-6)*6*1=24
1,6,6,11: 11+6+6+1=24
1,6,6,12: (12+6+6)*1=24
1,6,6,13: 13+6+6-1=24
1,6,7,7: failure(74)
1,6,7,8: failure(75)
1,6,7,9: (7+1)*(9-6)=24
1,6,7,10: 10+7+6+1=24
1,6,7,11: (11-7)*6*1=24
1,6,7,12: 12+7+6-1=24
1,6,7,13: failure(76)
1,6,8,8: (8-6+1)*8=24
1,6,8,9: 9+8+6+1=24
1,6,8,10: (10+8+6)*1=24
1,6,8,11: 11+8+6-1=24
1,6,8,12: (12-8)*6*1=24
1,6,8,13: (13-8-1)*6=24
1,6,9,9: (9+9+6)*1=24
1,6,9,10: 10+9+6-1=24
1,6,9,11: failure(77)
1,6,9,12: (12-9+1)*6=24
1,6,9,13: (13-9)*6*1=24
1,6,10,10: failure(78)
1,6,10,11: failure(79)
1,6,10,12: 12*10/(6-1)=24
1,6,10,13: (13-10+1)*6=24
1,6,11,11: failure(80)
1,6,11,12: (11+1)*12/6=24
1,6,11,13: (13*11+1)/6=24
1,6,12,12: 12*12*1/6=24
1,6,12,13: (13-1)*12/6=24
1,6,13,13: failure(81)
1,7,7,7: failure(82)
1,7,7,8: failure(83)
1,7,7,9: 9+7+7+1=24
1,7,7,10: (10+7+7)*1=24
1,7,7,11: (11-7)*(7-1)=24
1,7,7,12: (7/7+1)*12=24
1,7,7,13: failure(84)
1,7,8,8: 8+8+7+1=24
1,7,8,9: (9+8+7)*1=24
1,7,8,10: 10+8+7-1=24
1,7,8,11: (11-7-1)*8=24
1,7,8,12: (12-8)*(7-1)=24
1,7,8,13: failure(85)
1,7,9,9: 9+9+7-1=24
1,7,9,10: (10-7)*(9-1)=24
1,7,9,11: (11+1)*(9-7)=24
1,7,9,12: (9-7)*12*1=24
1,7,9,13: (13-9)*(7-1)=24
1,7,10,10: failure(86)
1,7,10,11: failure(87)
1,7,10,12: (10-7-1)*12=24
1,7,10,13: (7+1)*(13-10)=24
1,7,11,11: failure(88)
1,7,11,12: failure(89)
1,7,11,13: failure(90)
1,7,12,12: 12*12/(7-1)=24
1,7,12,13: (13+1)*12/7=24
1,7,13,13: (13*13-1)/7=24
1,8,8,8: (8+8+8)*1=24
1,8,8,9: 9+8+8-1=24
1,8,8,10: (10-8+1)*8=24
1,8,8,11: (11-8)*8*1=24
1,8,8,12: (12-8-1)*8=24
1,8,8,13: failure(91)
1,8,9,9: failure(92)
1,8,9,10: failure(93)
1,8,9,11: (11-9+1)*8=24
1,8,9,12: (12-9)*8*1=24
1,8,9,13: (13-9-1)*8=24
1,8,10,10: failure(94)
1,8,10,11: (11+1)*(10-8)=24
1,8,10,12: (12-10+1)*8=24
1,8,10,13: (13-10)*8*1=24
1,8,11,11: failure(95)
1,8,11,12: (11-8-1)*12=24
1,8,11,13: (13-11+1)*8=24
1,8,12,12: 12/(12/8-1)=24
1,8,12,13: failure(96)
1,8,13,13: failure(97)
1,9,9,9: failure(98)
1,9,9,10: failure(99)
1,9,9,11: failure(100)
1,9,9,12: (12-9)*(9-1)=24
1,9,9,13: failure(101)
1,9,10,10: failure(102)
1,9,10,11: failure(103)
1,9,10,12: (10-9+1)*12=24
1,9,10,13: (13-10)*(9-1)=24
1,9,11,11: (11+1)*(11-9)=24
1,9,11,12: (11-9)*12*1=24
1,9,11,13: (13-1)*(11-9)=24
1,9,12,12: (12-9-1)*12=24
1,9,12,13: failure(104)
1,9,13,13: failure(105)
1,10,10,10: failure(106)
1,10,10,11: failure(107)
1,10,10,12: (10/10+1)*12=24
1,10,10,13: failure(108)
1,10,11,11: failure(109)
1,10,11,12: (11-10+1)*12=24
1,10,11,13: failure(110)
1,10,12,12: (12-10)*12*1=24
1,10,12,13: (13-10-1)*12=24
1,10,13,13: failure(111)
1,11,11,11: failure(112)
1,11,11,12: (11/11+1)*12=24
1,11,11,13: (13/11+1)*11=24
1,11,12,12: (12-11+1)*12=24
1,11,12,13: (13-11)*12*1=24
1,11,13,13: (13-11)*(13-1)=24
1,12,12,12: (12/12+1)*12=24
1,12,12,13: (13-12+1)*12=24
1,12,13,13: (13/13+1)*12=24
1,13,13,13: failure(113)
2,2,2,2: failure(114)
2,2,2,3: 3*2*2*2=24
2,2,2,4: (4+2)*(2+2)=24
2,2,2,5: (5*2+2)*2=24
2,2,2,6: failure(115)
2,2,2,7: (7*2-2)*2=24
2,2,2,8: (8-2)*2*2=24
2,2,2,9: (9+2)*2+2=24
2,2,2,10: 10*2+2*2=24
2,2,2,11: (11+2)*2-2=24
2,2,2,12: 12*2*2/2=24
2,2,2,13: (13-2)*2+2=24
2,2,3,3: (3+3)*(2+2)=24
2,2,3,4: (4+2+2)*3=24
2,2,3,5: (5*2-2)*3=24
2,2,3,6: (6-2)*3*2=24
2,2,3,7: (7+3+2)*2=24
2,2,3,8: 8*3*2/2=24
2,2,3,9: (9-3)*2*2=24
2,2,3,10: (10+3)*2-2=24
2,2,3,11: (11+3-2)*2=24
2,2,3,12: 12*2/(3-2)=24
2,2,3,13: (13-3+2)*2=24
2,2,4,4: (4*2+4)*2=24
2,2,4,5: 5*4+2*2=24
2,2,4,6: (6+4+2)*2=24
2,2,4,7: 7*4-2*2=24
2,2,4,8: 8*2+4*2=24
2,2,4,9: (9+4)*2-2=24
2,2,4,10: (10-4)*2*2=24
2,2,4,11: 11*4/2+2=24
2,2,4,12: (12-2)*2+4=24
2,2,4,13: 13*4/2-2=24
2,2,5,5: 5*5-2/2=24
2,2,5,6: (6+5)*2+2=24
2,2,5,7: 7*2+5*2=24
2,2,5,8: (8+5)*2-2=24
2,2,5,9: (9+5-2)*2=24
2,2,5,10: (10*5-2)/2=24
2,2,5,11: (11-5)*2*2=24
2,2,5,12: 5*2+12+2=24
2,2,5,13: failure(116)
2,2,6,6: 6*2+6*2=24
2,2,6,7: (7+6)*2-2=24
2,2,6,8: (8+6-2)*2=24
2,2,6,9: (9*2-6)*2=24
2,2,6,10: (10-2)*6/2=24
2,2,6,11: (11-2)*2+6=24
2,2,6,12: (12-6)*2*2=24
2,2,6,13: (13+2)*2-6=24
2,2,7,7: (7+7-2)*2=24
2,2,7,8: 7*2+8+2=24
2,2,7,9: failure(117)
2,2,7,10: (10/2+7)*2=24
2,2,7,11: failure(118)
2,2,7,12: 7*2+12-2=24
2,2,7,13: (13-7)*2*2=24
2,2,8,8: (8/2+8)*2=24
2,2,8,9: 9*2+8-2=24
2,2,8,10: 10*2+8/2=24
2,2,8,11: failure(119)
2,2,8,12: 12*8/(2+2)=24
2,2,8,13: failure(120)
2,2,9,9: failure(121)
2,2,9,10: (9-2)*2+10=24
2,2,9,11: 11+9+2+2=24
2,2,9,12: 9*2+12/2=24
2,2,9,13: failure(122)
2,2,10,10: 10+10+2+2=24
2,2,10,11: (11*2-10)*2=24
2,2,10,12: failure(123)
2,2,10,13: 2/2+13+10=24
2,2,11,11: (2/11+2)*11=24
2,2,11,12: 2/2+12+11=24
2,2,11,13: (13+11)*2/2=24
2,2,12,12: (12+12)*2/2=24
2,2,12,13: (13-2/2)+12=24
2,2,13,13: (2-2/13)*13=24
2,3,3,3: (3*3+3)*2=24
2,3,3,4: failure(124)
2,3,3,5: (5*3-3)*2=24
2,3,3,6: 6*3+3*2=24
2,3,3,7: (7-3)*3*2=24
2,3,3,8: 8*3/(3-2)=24
2,3,3,9: (9-3+2)*3=24
2,3,3,10: 10*3-3*2=24
2,3,3,11: (11-2)*3-3=24
2,3,3,12: 12*3*2/3=24
2,3,3,13: (13+3)*3/2=24
2,3,4,4: 4*4*3/2=24
2,3,4,5: (5+4+3)*2=24
2,3,4,6: 6*4/(3-2)=24
2,3,4,7: (7-3+2)*4=24
2,3,4,8: (8-4)*3*2=24
2,3,4,9: 9*4*2/3=24
2,3,4,10: (10-4+2)*3=24
2,3,4,11: (11+4-3)*2=24
2,3,4,12: (12+4)*3/2=24
2,3,4,13: (13-4+3)*2=24
2,3,5,5: 5*5-3+2=24
2,3,5,6: 6*5-3*2=24
2,3,5,7: 7*3+5-2=24
2,3,5,8: 8*2+5+3=24
2,3,5,9: (9-5)*3*2=24
2,3,5,10: (10+5-3)*2=24
2,3,5,11: (11+5)*3/2=24
2,3,5,12: 12/(3-5/2)=24
2,3,5,13: 13*2-5+3=24
2,3,6,6: 6*6*2/3=24
2,3,6,7: 7*6/2+3=24
2,3,6,8: (8-2)*3+6=24
2,3,6,9: (9+6-3)*2=24
2,3,6,10: (10-6)*3*2=24
2,3,6,11: 11*6/3+2=24
2,3,6,12: (12-6+2)*3=24
2,3,6,13: 13+6+3+2=24
2,3,7,7: 7*2+7+3=24
2,3,7,8: (8+7-3)*2=24
2,3,7,9: (9+7)*3/2=24
2,3,7,10: (10*7+2)/3=24
2,3,7,11: (11-7)*3*2=24
2,3,7,12: 12+7+3+2=24
2,3,7,13: (13-7+2)*3=24
2,3,8,8: (8+8)*3/2=24
2,3,8,9: (9-3)*8/2=24
2,3,8,10: 10*3-8+2=24
2,3,8,11: 11+8+3+2=24
2,3,8,12: (12-8)*3*2=24
2,3,8,13: (13+3)*2-8=24
2,3,9,9: (9/3+9)*2=24
2,3,9,10: 10+9+3+2=24
2,3,9,11: failure(125)
2,3,9,12: (9-3)*2+12=24
2,3,9,13: (13-9)*3*2=24
2,3,10,10: (10-3)*2+10=24
2,3,10,11: failure(126)
2,3,10,12: 12*10/(3+2)=24
2,3,10,13: 13+10+3-2=24
2,3,11,11: 11*3-11+2=24
2,3,11,12: 12+11+3-2=24
2,3,11,13: (13+11)*(3-2)=24
2,3,12,12: (12+12)*(3-2)=24
2,3,12,13: 13+12-3+2=24
2,3,13,13: 13*3-13-2=24
2,4,4,4: 4*4+4*2=24
2,4,4,5: (5*2-4)*4=24
2,4,4,6: (6+4)*2+4=24
2,4,4,7: (7-4)*4*2=24
2,4,4,8: 8*4-4*2=24
2,4,4,9: (9-2)*4-4=24
2,4,4,10: 10*4/2+4=24
2,4,4,11: (11*4+4)/2=24
2,4,4,12: 12*4/(4-2)=24
2,4,4,13: (13*4-4)/2=24
2,4,5,5: (5+5)*2+4=24
2,4,5,6: 6*5-4-2=24
2,4,5,7: (7+5)*(4-2)=24
2,4,5,8: (8-5)*4*2=24
2,4,5,9: (9-5+2)*4=24
2,4,5,10: 5*2+10+4=24
2,4,5,11: (11+5-4)*2=24
2,4,5,12: (12-4)*(5-2)=24
2,4,5,13: (13-5+4)*2=24
2,4,6,6: (6+6)*(4-2)=24
2,4,6,7: 7*4-6+2=24
2,4,6,8: 8*6/(4-2)=24
2,4,6,9: (9-6)*4*2=24
2,4,6,10: (10+6-4)*2=24
2,4,6,11: 4/(2-11/6)=24
2,4,6,12: 12+6+4+2=24
2,4,6,13: 4/(13/6-2)=24
2,4,7,7: (7+7)*2-4=24
2,4,7,8: 8*7/2-4=24
2,4,7,9: (9+7-4)*2=24
2,4,7,10: (10-7)*4*2=24
2,4,7,11: 11+7+4+2=24
2,4,7,12: (7+2)*4-12=24
2,4,7,13: failure(127)
2,4,8,8: (8+8-4)*2=24
2,4,8,9: (9-4-2)*8=24
2,4,8,10: 10+8+4+2=24
2,4,8,11: (11-8)*4*2=24
2,4,8,12: (12-8+2)*4=24
2,4,8,13: 13*8/4-2=24
2,4,9,9: 9+9+4+2=24
2,4,9,10: 9*4-10-2=24
2,4,9,11: failure(128)
2,4,9,12: (12-9)*4*2=24
2,4,9,13: 13+9+4-2=24
2,4,10,10: (4/10+2)*10=24
2,4,10,11: 11*4-10*2=24
2,4,10,12: 12+10+4-2=24
2,4,10,13: (13-10)*4*2=24
2,4,11,11: 11+11+4-2=24
2,4,11,12: (11-2)*4-12=24
2,4,11,13: failure(129)
2,4,12,12: 12*12/(4+2)=24
2,4,12,13: failure(130)
2,4,13,13: 13+13-4+2=24
2,5,5,5: failure(131)
2,5,5,6: failure(132)
2,5,5,7: 7*2+5+5=24
2,5,5,8: (5/5+2)*8=24
2,5,5,9: 5*2+9+5=24
2,5,5,10: (5-2/10)*5=24
2,5,5,11: (5/5+11)*2=24
2,5,5,12: 12*5*2/5=24
2,5,5,13: (13-5)*(5-2)=24
2,5,6,6: (5*2-6)*6=24
2,5,6,7: (7-5)*6*2=24
2,5,6,8: (8-2)*5-6=24
2,5,6,9: 6*5/2+9=24
2,5,6,10: 10*6*2/5=24
2,5,6,11: (11+6-5)*2=24
2,5,6,12: 12*6/(5-2)=24
2,5,6,13: (13-6+5)*2=24
2,5,7,7: 5*2+7+7=24
2,5,7,8: (5*2-7)*8=24
2,5,7,9: 7*5-9-2=24
2,5,7,10: (10+7-5)*2=24
2,5,7,11: (11*5-7)/2=24
2,5,7,12: failure(133)
2,5,7,13: 13*2-7+5=24
2,5,8,8: 8*5-8*2=24
2,5,8,9: 9*8/(5-2)=24
2,5,8,10: (10-5-2)*8=24
2,5,8,11: (11-5)*8/2=24
2,5,8,12: (8+2)*12/5=24
2,5,8,13: 13+8+5-2=24
2,5,9,9: failure(134)
2,5,9,10: 10*2+9-5=24
2,5,9,11: 9*2+11-5=24
2,5,9,12: 12+9+5-2=24
2,5,9,13: failure(135)
2,5,10,10: (10/5+10)*2=24
2,5,10,11: 11*10/5+2=24
2,5,10,12: (12-5)*2+10=24
2,5,10,13: 13*10/5-2=24
2,5,11,11: failure(136)
2,5,11,12: (11-5)*2+12=24
2,5,11,13: failure(137)
2,5,12,12: (12*5-12)/2=24
2,5,12,13: (13+5)*2-12=24
2,5,13,13: failure(138)
2,6,6,6: 6*6-6*2=24
2,6,6,7: (7*6+6)/2=24
2,6,6,8: (8-6)*6*2=24
2,6,6,9: (9*6-6)/2=24
2,6,6,10: 10+6+6+2=24
2,6,6,11: (6/6+11)*2=24
2,6,6,12: (12-6)*(6-2)=24
2,6,6,13: (13-6/6)*2=24
2,6,7,7: failure(139)
2,6,7,8: (8+7)*2-6=24
2,6,7,9: (9-7)*6*2=24
2,6,7,10: (7*2-10)*6=24
2,6,7,11: (11+7-6)*2=24
2,6,7,12: 12*2/(7-6)=24
2,6,7,13: (13-7)*(6-2)=24
2,6,8,8: 8+8+6+2=24
2,6,8,9: 9*8*2/6=24
2,6,8,10: (10-8)*6*2=24
2,6,8,11: (11-6-2)*8=24
2,6,8,12: 12*8/(6-2)=24
2,6,8,13: 13*2-8+6=24
2,6,9,9: (9+9-6)*2=24
2,6,9,10: (10-2)*(9-6)=24
2,6,9,11: (11-9)*6*2=24
2,6,9,12: 12/(2-9/6)=24
2,6,9,13: failure(140)
2,6,10,10: 10+10+6-2=24
2,6,10,11: (11+6)*2-10=24
2,6,10,12: (12-10)*6*2=24
2,6,10,13: (13-6)*2+10=24
2,6,11,11: failure(141)
2,6,11,12: 12*11/6+2=24
2,6,11,13: (13-11)*6*2=24
2,6,12,12: (12-6)*2+12=24
2,6,12,13: 13*12/6-2=24
2,6,13,13: failure(142)
2,7,7,7: failure(143)
2,7,7,8: 8+7+7+2=24
2,7,7,9: failure(144)
2,7,7,10: (10/7+2)*7=24
2,7,7,11: (7/7+11)*2=24
2,7,7,12: 12*7*2/7=24
2,7,7,13: (13-7/7)*2=24
2,7,8,8: (8*7-8)/2=24
2,7,8,9: (9+7)*2-8=24
2,7,8,10: failure(145)
2,7,8,11: (11+8-7)*2=24
2,7,8,12: (12-7-2)*8=24
2,7,8,13: (13-8+7)*2=24
2,7,9,9: failure(146)
2,7,9,10: (10+9-7)*2=24
2,7,9,11: 11*2+9-7=24
2,7,9,12: failure(147)
2,7,9,13: 13*2-9+7=24
2,7,10,10: (10-7)*(10-2)=24
2,7,10,11: 10*7/2-11=24
2,7,10,12: 12*10/(7-2)=24
2,7,10,13: failure(148)
2,7,11,11: failure(149)
2,7,11,12: 12/2+11+7=24
2,7,11,13: failure(150)
2,7,12,12: (12+2)*12/7=24
2,7,12,13: (13-7)*2+12=24
2,7,13,13: failure(151)
2,8,8,8: (8/8+2)*8=24
2,8,8,9: (9-8+2)*8=24
2,8,8,10: 10+8+8-2=24
2,8,8,11: (8/8+11)*2=24
2,8,8,12: (12-8)*(8-2)=24
2,8,8,13: (13-8-2)*8=24
2,8,9,9: 9+9+8-2=24
2,8,9,10: (10-9+2)*8=24
2,8,9,11: (11+9-8)*2=24
2,8,9,12: 12*2/(9-8)=24
2,8,9,13: (13-9)*(8-2)=24
2,8,10,10: (10+10-8)*2=24
2,8,10,11: (11-10+2)*8=24
2,8,10,12: 12/2+10+8=24
2,8,10,13: 13*2-10+8=24
2,8,11,11: (11/11+2)*8=24
2,8,11,12: (12-11+2)*8=24
2,8,11,13: failure(152)
2,8,12,12: 12*12/(8-2)=24
2,8,12,13: (13-12+2)*8=24
2,8,13,13: (13/13+2)*8=24
2,9,9,9: failure(153)
2,9,9,10: failure(154)
2,9,9,11: (9/9+11)*2=24
2,9,9,12: 12*9*2/9=24
2,9,9,13: (13-9/9)*2=24
2,9,10,10: 10/2+10+9=24
2,9,10,11: (11+10-9)*2=24
2,9,10,12: (12-9)*(10-2)=24
2,9,10,13: (13-10+9)*2=24
2,9,11,11: (11-9)*11+2=24
2,9,11,12: failure(155)
2,9,11,13: 13*2-11+9=24
2,9,12,12: failure(156)
2,9,12,13: (13-9)*12/2=24
2,9,13,13: (13+9)/2+13=24
2,10,10,10: failure(157)
2,10,10,11: (10/10+11)*2=24
2,10,10,12: 12*10*2/10=24
2,10,10,13: (13-10)*(10-2)=24
2,10,11,11: (11+11-10)*2=24
2,10,11,12: (12-10)*11+2=24
2,10,11,13: (13-11+10)*2=24
2,10,12,12: failure(158)
2,10,12,13: 13*2-12+10=24
2,10,13,13: failure(159)
2,11,11,11: (11/11+11)*2=24
2,11,11,12: 12*11*2/11=24
2,11,11,13: (13-11)*11+2=24
2,11,12,12: (12/12+11)*2=24
2,11,12,13: (13-12+11)*2=24
2,11,13,13: (13/13+11)*2=24
2,12,12,12: 12*12*2/12=24
2,12,12,13: (13-12)*12*2=24
2,12,13,13: 13*12*2/13=24
2,13,13,13: (13-13/13)*2=24
3,3,3,3: 3*3*3-3=24
3,3,3,4: (4+3)*3+3=24
3,3,3,5: 5*3+3*3=24
3,3,3,6: 6*3+3+3=24
3,3,3,7: (3+3)*(7-3)=24
3,3,3,8: 8*3*3/3=24
3,3,3,9: (9-3/3)*3=24
3,3,3,10: (10-3)*3+3=24
3,3,3,11: 11*3-3*3=24
3,3,3,12: (12-3)*3-3=24
3,3,3,13: failure(160)
3,3,4,4: 4*3+4*3=24
3,3,4,5: (5+4)*3-3=24
3,3,4,6: 6*4*3/3=24
3,3,4,7: (7+4-3)*3=24
3,3,4,8: 8*3/(4-3)=24
3,3,4,9: (9-4+3)*3=24
3,3,4,10: failure(161)
3,3,4,11: (11-4)*3+3=24
3,3,4,12: 12*3-4*3=24
3,3,4,13: (13-4)*3-3=24
3,3,5,5: 5*5-3/3=24
3,3,5,6: (6+5-3)*3=24
3,3,5,7: (5*3-7)*3=24
3,3,5,8: failure(162)
3,3,5,9: (9+3)*(5-3)=24
3,3,5,10: (10-5+3)*3=24
3,3,5,11: failure(163)
3,3,5,12: (12-5)*3+3=24
3,3,5,13: 13+5+3+3=24
3,3,6,6: (6/3+6)*3=24
3,3,6,7: 7*3+6-3=24
3,3,6,8: (6+3)*8/3=24
3,3,6,9: 9*3-6+3=24
3,3,6,10: (10-3-3)*6=24
3,3,6,11: (11-6+3)*3=24
3,3,6,12: 12+6+3+3=24
3,3,6,13: (13-6)*3+3=24
3,3,7,7: (3/7+3)*7=24
3,3,7,8: 3*3+8+7=24
3,3,7,9: 9*7/3+3=24
3,3,7,10: failure(164)
3,3,7,11: 11+7+3+3=24
3,3,7,12: (12-7+3)*3=24
3,3,7,13: (7*3-13)*3=24
3,3,8,8: 8/(3-8/3)=24
3,3,8,9: (9-3-3)*8=24
3,3,8,10: 10+8+3+3=24
3,3,8,11: failure(165)
3,3,8,12: (12-3)*8/3=24
3,3,8,13: (13-8+3)*3=24
3,3,9,9: 9+9+3+3=24
3,3,9,10: 10*3-9+3=24
3,3,9,11: (11-3)*9/3=24
3,3,9,12: 12*3-9-3=24
3,3,9,13: (3+3)*(13-9)=24
3,3,10,10: failure(166)
3,3,10,11: failure(167)
3,3,10,12: failure(168)
3,3,10,13: 3/3+13+10=24
3,3,11,11: failure(169)
3,3,11,12: 11*3-12+3=24
3,3,11,13: (13+11)*3/3=24
3,3,12,12: 12*12/(3+3)=24
3,3,12,13: 13*3-12-3=24
3,3,13,13: failure(170)
3,4,4,4: (4+3)*4-4=24
3,4,4,5: (5+4-3)*4=24
3,4,4,6: 6*4/(4-3)=24
3,4,4,7: (7-4+3)*4=24
3,4,4,8: 8*4*3/4=24
3,4,4,9: 9*4-4*3=24
3,4,4,10: (10-3)*4-4=24
3,4,4,11: 4*4+11-3=24
3,4,4,12: (12/4+3)*4=24
3,4,4,13: 13+4+4+3=24
3,4,5,5: 5*5-4+3=24
3,4,5,6: (5-4+3)*6=24
3,4,5,7: (7-5)*4*3=24
3,4,5,8: (8-5+3)*4=24
3,4,5,9: (9-5+4)*3=24
3,4,5,10: 10*4*3/5=24
3,4,5,11: 11*3-5-4=24
3,4,5,12: 12+5+4+3=24
3,4,5,13: (13+5)*4/3=24
3,4,6,6: 6*6-4*3=24
3,4,6,7: failure(171)
3,4,6,8: (8-6)*4*3=24
3,4,6,9: (9-6+3)*4=24
3,4,6,10: (10-6+4)*3=24
3,4,6,11: 11+6+4+3=24
3,4,6,12: 12*4*3/6=24
3,4,6,13: 6/(13/4-3)=24
3,4,7,7: (7-4)*7+3=24
3,4,7,8: (7-3)*4+8=24
3,4,7,9: (9-7)*4*3=24
3,4,7,10: 10+7+4+3=24
3,4,7,11: (11-7+4)*3=24
3,4,7,12: 12*7/4+3=24
3,4,7,13: failure(172)
3,4,8,8: failure(173)
3,4,8,9: 9+8+4+3=24
3,4,8,10: (10-8)*4*3=24
3,4,8,11: (11-8+3)*4=24
3,4,8,12: (12-8+4)*3=24
3,4,8,13: (13-4)*8/3=24
3,4,9,9: (9+9)*4/3=24
3,4,9,10: failure(174)
3,4,9,11: (11-9)*4*3=24
3,4,9,12: 12*9/4-3=24
3,4,9,13: (13-9+4)*3=24
3,4,10,10: 10*3-10+4=24
3,4,10,11: failure(175)
3,4,10,12: (12-10)*4*3=24
3,4,10,13: 13+10+4-3=24
3,4,11,11: failure(176)
3,4,11,12: 12+11+4-3=24
3,4,11,13: (13+11)*(4-3)=24
3,4,12,12: (12+12)*(4-3)=24
3,4,12,13: 13+12-4+3=24
3,4,13,13: failure(177)
3,5,5,5: failure(178)
3,5,5,6: (5/5+3)*6=24
3,5,5,7: (7+5)*(5-3)=24
3,5,5,8: 8*5*3/5=24
3,5,5,9: (9/5+3)*5=24
3,5,5,10: failure(179)
3,5,5,11: 11+5+5+3=24
3,5,5,12: (3-5/5)*12=24
3,5,5,13: failure(180)
3,5,6,6: (6+6)*(5-3)=24
3,5,6,7: (7+6-5)*3=24
3,5,6,8: 8*6/(5-3)=24
3,5,6,9: (9-6+5)*3=24
3,5,6,10: 10+6+5+3=24
3,5,6,11: (11-5)*3+6=24
3,5,6,12: (12-5-3)*6=24
3,5,6,13: (13-5)*(6-3)=24
3,5,7,7: failure(181)
3,5,7,8: (8-5)*7+3=24
3,5,7,9: 9+7+5+3=24
3,5,7,10: (10-7+5)*3=24
3,5,7,11: (11*7-5)/3=24
3,5,7,12: 12*3-7-5=24
3,5,7,13: (13*5+7)/3=24
3,5,8,8: 8+8+5+3=24
3,5,8,9: 9*3-8+5=24
3,5,8,10: failure(182)
3,5,8,11: (11-8+5)*3=24
3,5,8,12: (12+3)*8/5=24
3,5,8,13: 8*5-13-3=24
3,5,9,9: (9-5)*(9-3)=24
3,5,9,10: (10-5)*3+9=24
3,5,9,11: failure(183)
3,5,9,12: (12-9+5)*3=24
3,5,9,13: 13+9+5-3=24
3,5,10,10: (10-10/5)*3=24
3,5,10,11: 10*3-11+5=24
3,5,10,12: 12+10+5-3=24
3,5,10,13: (13-10+5)*3=24
3,5,11,11: 11+11+5-3=24
3,5,11,12: (11-5)*12/3=24
3,5,11,13: failure(184)
3,5,12,12: 12*5-12*3=24
3,5,12,13: (13-3)*12/5=24
3,5,13,13: 13+13-5+3=24
3,6,6,6: (6+6)*6/3=24
3,6,6,7: 7*6-6*3=24
3,6,6,8: 8*6*3/6=24
3,6,6,9: 9+6+6+3=24
3,6,6,10: (6-3)*10-6=24
3,6,6,11: (11*6+6)/3=24
3,6,6,12: 12*6/(6-3)=24
3,6,6,13: (13*6-6)/3=24
3,6,7,7: (7+7-6)*3=24
3,6,7,8: 8+7+6+3=24
3,6,7,9: (9-7+6)*3=24
3,6,7,10: 7*6/3+10=24
3,6,7,11: failure(185)
3,6,7,12: (12-6)*(7-3)=24
3,6,7,13: (13-7)*3+6=24
3,6,8,8: (8/8+3)*6=24
3,6,8,9: 9*8/(6-3)=24
3,6,8,10: (10-8+6)*3=24
3,6,8,11: failure(186)
3,6,8,12: (12-6-3)*8=24
3,6,8,13: 13+8+6-3=24
3,6,9,9: (9/9+3)*6=24
3,6,9,10: (10-9+3)*6=24
3,6,9,11: (11-9+6)*3=24
3,6,9,12: 12*6*3/9=24
3,6,9,13: (13+3)*9/6=24
3,6,10,10: (10/10+3)*6=24
3,6,10,11: 11+10+6-3=24
3,6,10,12: (12-10+6)*3=24
3,6,10,13: failure(187)
3,6,11,11: (11/11+3)*6=24
3,6,11,12: (12-11+3)*6=24
3,6,11,13: (13-11+6)*3=24
3,6,12,12: (12/12+3)*6=24
3,6,12,13: (13-12+3)*6=24
3,6,13,13: (13/13+3)*6=24
3,7,7,7: (7/7+7)*3=24
3,7,7,8: 8*7*3/7=24
3,7,7,9: (9-7/7)*3=24
3,7,7,10: (10-7)*7+3=24
3,7,7,11: failure(188)
3,7,7,12: (3-7/7)*12=24
3,7,7,13: (13-7)*(7-3)=24
3,7,8,8: (8/8+7)*3=24
3,7,8,9: (9-8+7)*3=24
3,7,8,10: failure(189)
3,7,8,11: (11-8)*7+3=24
3,7,8,12: 12*8/(7-3)=24
3,7,8,13: (13-7-3)*8=24
3,7,9,9: (9/9+7)*3=24
3,7,9,10: (10-9+7)*3=24
3,7,9,11: 11+9+7-3=24
3,7,9,12: (12-9)*7+3=24
3,7,9,13: (7-13/3)*9=24
3,7,10,10: (10/10+7)*3=24
3,7,10,11: (11-10+7)*3=24
3,7,10,12: failure(190)
3,7,10,13: (13-10)*7+3=24
3,7,11,11: (11/11+7)*3=24
3,7,11,12: (12-11+7)*3=24
3,7,11,13: failure(191)
3,7,12,12: (12/12+7)*3=24
3,7,12,13: (13-12+7)*3=24
3,7,13,13: (13/13+7)*3=24
3,8,8,8: 8*8*3/8=24
3,8,8,9: (9-8)*8*3=24
3,8,8,10: (10*8-8)/3=24
3,8,8,11: 11+8+8-3=24
3,8,8,12: 12*8/3-8=24
3,8,8,13: failure(192)
3,8,9,9: 9*8*3/9=24
3,8,9,10: (10-9)*8*3=24
3,8,9,11: (11-8)*9-3=24
3,8,9,12: (12-8)*(9-3)=24
3,8,9,13: (13-8)*3+9=24
3,8,10,10: 10*8*3/10=24
3,8,10,11: (11-10)*8*3=24
3,8,10,12: 12*10/(8-3)=24
3,8,10,13: failure(193)
3,8,11,11: 11*8*3/11=24
3,8,11,12: (12-11)*8*3=24
3,8,11,13: failure(194)
3,8,12,12: 12*8*3/12=24
3,8,12,13: (13-12)*8*3=24
3,8,13,13: 13*8*3/13=24
3,9,9,9: (9-9/9)*3=24
3,9,9,10: (9+9-10)*3=24
3,9,9,11: 11*9/3-9=24
3,9,9,12: (12-9)*9-3=24
3,9,9,13: (13-9)*(9-3)=24
3,9,10,10: (9-10/10)*3=24
3,9,10,11: (10+9-11)*3=24
3,9,10,12: (9+3)*(12-10)=24
3,9,10,13: (13-10)*9-3=24
3,9,11,11: (9-11/11)*3=24
3,9,11,12: (12-9)*(11-3)=24
3,9,11,13: (9+3)*(13-11)=24
3,9,12,12: 12*12/(9-3)=24
3,9,12,13: (13-9)*3+12=24
3,9,13,13: (9-13/13)*3=24
3,10,10,10: failure(195)
3,10,10,11: failure(196)
3,10,10,12: 12/3+10+10=24
3,10,10,13: failure(197)
3,10,11,11: failure(198)
3,10,11,12: (10+3-11)*12=24
3,10,11,13: (13-10)*(11-3)=24
3,10,12,12: failure(199)
3,10,12,13: failure(200)
3,10,13,13: failure(201)
3,11,11,11: failure(202)
3,11,11,12: (3-11/11)*12=24
3,11,11,13: failure(203)
3,11,12,12: (11+3-12)*12=24
3,11,12,13: failure(204)
3,11,13,13: failure(205)
3,12,12,12: (3-12/12)*12=24
3,12,12,13: (12+3-13)*12=24
3,12,13,13: (3-13/13)*12=24
3,13,13,13: failure(206)

2010-11-11 19:20
yu_hua
Rank: 2
等 级:论坛游民
帖 子:222
专家分:95
注 册:2006-8-10
收藏
得分:0 

4,4,4,4: 4*4+4+4=24
4,4,4,5: (4/4+5)*4=24
4,4,4,6: 6*4*4/4=24
4,4,4,7: (4+4)*(7-4)=24
4,4,4,8: (8/4+4)*4=24
4,4,4,9: (9-4)*4+4=24
4,4,4,10: 10*4-4*4=24
4,4,4,11: (11-4)*4-4=24
4,4,4,12: 12+4+4+4=24
4,4,4,13: failure(207)
4,4,5,5: 5*5-4/4=24
4,4,5,6: 6*4/(5-4)=24
4,4,5,7: (7-5+4)*4=24
4,4,5,8: 8*5-4*4=24
4,4,5,9: failure(208)
4,4,5,10: (10/5+4)*4=24
4,4,5,11: 11+5+4+4=24
4,4,5,12: (12-5)*4-4=24
4,4,5,13: 4*4+13-5=24
4,4,6,6: failure(209)
4,4,6,7: failure(210)
4,4,6,8: (8-6+4)*4=24
4,4,6,9: 9*4*4/6=24
4,4,6,10: 10+6+4+4=24
4,4,6,11: (11-6)*4+4=24
4,4,6,12: (12/6+4)*4=24
4,4,6,13: (13-6)*4-4=24
4,4,7,7: (4-4/7)*7=24
4,4,7,8: (8-4)*7-4=24
4,4,7,9: (9-7+4)*4=24
4,4,7,10: (4+4)*(10-7)=24
4,4,7,11: failure(211)
4,4,7,12: (12-7)*4+4=24
4,4,7,13: 13*4-7*4=24
4,4,8,8: 8+8+4+4=24
4,4,8,9: 9*4-8-4=24
4,4,8,10: (10-8+4)*4=24
4,4,8,11: (11-4-4)*8=24
4,4,8,12: 12*4*4/8=24
4,4,8,13: (13-8)*4+4=24
4,4,9,9: failure(212)
4,4,9,10: failure(213)
4,4,9,11: (11-9+4)*4=24
4,4,9,12: (9-12/4)*4=24
4,4,9,13: failure(214)
4,4,10,10: (10*10-4)/4=24
4,4,10,11: failure(215)
4,4,10,12: (12-10+4)*4=24
4,4,10,13: (4+4)*(13-10)=24
4,4,11,11: failure(216)
4,4,11,12: 4/4+12+11=24
4,4,11,13: (13-11+4)*4=24
4,4,12,12: (12+12)*4/4=24
4,4,12,13: (13-4)*4-12=24
4,4,13,13: failure(217)
4,5,5,5: (5/5+5)*4=24
4,5,5,6: 6*5*4/5=24
4,5,5,7: (7-5/5)*4=24
4,5,5,8: (4-5/5)*8=24
4,5,5,9: (9-5)*5+4=24
4,5,5,10: 10+5+5+4=24
4,5,5,11: failure(218)
4,5,5,12: failure(219)
4,5,5,13: failure(220)
4,5,6,6: (6/6+5)*4=24
4,5,6,7: (7-6+5)*4=24
4,5,6,8: (5+4-6)*8=24
4,5,6,9: 9+6+5+4=24
4,5,6,10: (10-6)*5+4=24
4,5,6,11: (11+5)*6/4=24
4,5,6,12: (6+4)*12/5=24
4,5,6,13: (13-5-4)*6=24
4,5,7,7: (7/7+5)*4=24
4,5,7,8: (8-7+5)*4=24
4,5,7,9: (9-5)*7-4=24
4,5,7,10: (7-5)*10+4=24
4,5,7,11: (11-7)*5+4=24
4,5,7,12: 12*4/(7-5)=24
4,5,7,13: (13*7+5)/4=24
4,5,8,8: (8/8+5)*4=24
4,5,8,9: (9-8+5)*4=24
4,5,8,10: (8-10/5)*4=24
4,5,8,11: (11-5)*(8-4)=24
4,5,8,12: (12-8)*5+4=24
4,5,8,13: (13-5)*4-8=24
4,5,9,9: (9/9+5)*4=24
4,5,9,10: (10-9+5)*4=24
4,5,9,11: failure(221)
4,5,9,12: 12*5-9*4=24
4,5,9,13: (13-9)*5+4=24
4,5,10,10: (10/10+5)*4=24
4,5,10,11: (11-10+5)*4=24
4,5,10,12: 12*5*4/10=24
4,5,10,13: 13+10+5-4=24
4,5,11,11: (11/11+5)*4=24
4,5,11,12: (12-11+5)*4=24
4,5,11,13: (13+11)*(5-4)=24
4,5,12,12: (12+12)*(5-4)=24
4,5,12,13: (13-12+5)*4=24
4,5,13,13: (13/13+5)*4=24
4,6,6,6: (6+6)*(6-4)=24
4,6,6,7: (7-6)*6*4=24
4,6,6,8: 8*6-6*4=24
4,6,6,9: (9-4)*6-6=24
4,6,6,10: (10+6)*6/4=24
4,6,6,11: failure(222)
4,6,6,12: 12*6/4+6=24
4,6,6,13: failure(223)
4,6,7,7: 7*6*4/7=24
4,6,7,8: (8-7)*6*4=24
4,6,7,9: (9+7)*6/4=24
4,6,7,10: (10-6)*7-4=24
4,6,7,11: failure(224)
4,6,7,12: 12*6/(7-4)=24
4,6,7,13: failure(225)
4,6,8,8: 8*6*4/8=24
4,6,8,9: (9-8)*6*4=24
4,6,8,10: (10-6)*4+8=24
4,6,8,11: failure(226)
4,6,8,12: (12-6)*(8-4)=24
4,6,8,13: (13-6-4)*8=24
4,6,9,9: 9*6*4/9=24
4,6,9,10: (10-9)*6*4=24
4,6,9,11: failure(227)
4,6,9,12: (12-4)*(9-6)=24
4,6,9,13: 13+9+6-4=24
4,6,10,10: 10*6*4/10=24
4,6,10,11: (11-10)*6*4=24
4,6,10,12: 12*10/6+4=24
4,6,10,13: failure(228)
4,6,11,11: 11*6*4/11=24
4,6,11,12: (12-11)*6*4=24
4,6,11,13: failure(229)
4,6,12,12: 12*6*4/12=24
4,6,12,13: (13-12)*6*4=24
4,6,13,13: 13*6*4/13=24
4,7,7,7: (7-7/7)*4=24
4,7,7,8: (7+7-8)*4=24
4,7,7,9: failure(230)
4,7,7,10: failure(231)
4,7,7,11: (11-7)*7-4=24
4,7,7,12: failure(232)
4,7,7,13: failure(233)
4,7,8,8: (7-8/8)*4=24
4,7,8,9: 9*8/(7-4)=24
4,7,8,10: 8*7/4+10=24
4,7,8,11: (11-7)*4+8=24
4,7,8,12: (12-8)*7-4=24
4,7,8,13: 13+8+7-4=24
4,7,9,9: (7-9/9)*4=24
4,7,9,10: 10*4-9-7=24
4,7,9,11: (9-4)*7-11=24
4,7,9,12: 12+9+7-4=24
4,7,9,13: (13-9)*7-4=24
4,7,10,10: (7-10/10)*4=24
4,7,10,11: 11+10+7-4=24
4,7,10,12: (12-4)*(10-7)=24
4,7,10,13: failure(234)
4,7,11,11: (7-11/11)*4=24
4,7,11,12: (11+7-12)*4=24
4,7,11,13: 11*4-13-7=24
4,7,12,12: (7-12/12)*4=24
4,7,12,13: (13-7-4)*12=24
4,7,13,13: (7-13/13)*4=24
4,8,8,8: (4-8/8)*8=24
4,8,8,9: (8+4-9)*8=24
4,8,8,10: 10*4-8-8=24
4,8,8,11: (11*8+8)/4=24
4,8,8,12: 12*8/(8-4)=24
4,8,8,13: (13*8-8)/4=24
4,8,9,9: (4-9/9)*8=24
4,8,9,10: (9+4-10)*8=24
4,8,9,11: 11+9+8-4=24
4,8,9,12: 9*8*4/12=24
4,8,9,13: (13-9)*4+8=24
4,8,10,10: 10+10+8-4=24
4,8,10,11: (10+4-11)*8=24
4,8,10,12: (12-8)*(10-4)=24
4,8,10,13: failure(235)
4,8,11,11: (4-11/11)*8=24
4,8,11,12: (12-4)*(11-8)=24
4,8,11,13: (11+8-13)*4=24
4,8,12,12: (4-12/12)*8=24
4,8,12,13: (12+4-13)*8=24
4,8,13,13: (4-13/13)*8=24
4,9,9,9: failure(236)
4,9,9,10: 10+9+9-4=24
4,9,9,11: failure(237)
4,9,9,12: (4-12/9)*9=24
4,9,9,13: failure(238)
4,9,10,10: failure(239)
4,9,10,11: (11-9)*10+4=24
4,9,10,12: 12*10/(9-4)=24
4,9,10,13: (13-9)*(10-4)=24
4,9,11,11: 11*4-11-9=24
4,9,11,12: 12*11/4-9=24
4,9,11,13: failure(240)
4,9,12,12: (12-9)*(12-4)=24
4,9,12,13: failure(241)
4,9,13,13: failure(242)
4,10,10,10: failure(243)
4,10,10,11: 11*4-10-10=24
4,10,10,12: (12-10)*10+4=24
4,10,10,13: failure(244)
4,10,11,11: failure(245)
4,10,11,12: 12/4+11+10=24
4,10,11,13: (13-11)*10+4=24
4,10,12,12: 12*12/(10-4)=24
4,10,12,13: (13-10)*(12-4)=24
4,10,13,13: failure(246)
4,11,11,11: failure(247)
4,11,11,12: failure(248)
4,11,11,13: failure(249)
4,11,12,12: failure(250)
4,11,12,13: 12*4/(13-11)=24
4,11,13,13: failure(251)
4,12,12,12: 12*12/4-12=24
4,12,12,13: failure(252)
4,12,13,13: failure(253)
4,13,13,13: failure(254)
5,5,5,5: 5*5-5/5=24
5,5,5,6: 5*5-6+5=24
5,5,5,7: failure(255)
5,5,5,8: failure(256)
5,5,5,9: 9+5+5+5=24
5,5,5,10: failure(257)
5,5,5,11: failure(258)
5,5,5,12: (5+5)*12/5=24
5,5,5,13: failure(259)
5,5,6,6: (6-6/5)*5=24
5,5,6,7: 7*5-6-5=24
5,5,6,8: 8+6+5+5=24
5,5,6,9: failure(260)
5,5,6,10: failure(261)
5,5,6,11: (11-5)*5-6=24
5,5,6,12: failure(262)
5,5,6,13: failure(263)
5,5,7,7: 7*7-5*5=24
5,5,7,8: 5*5-8+7=24
5,5,7,9: failure(264)
5,5,7,10: (7+5)*10/5=24
5,5,7,11: (7-11/5)*5=24
5,5,7,12: failure(265)
5,5,7,13: failure(266)
5,5,8,8: 5*5-8/8=24
5,5,8,9: (8-5)*5+9=24
5,5,8,10: (10+5)*8/5=24
5,5,8,11: 8*5-11-5=24
5,5,8,12: (5+5-8)*12=24
5,5,8,13: (13-5)*(8-5)=24
5,5,9,9: 5*5-9/9=24
5,5,9,10: 5*5-10+9=24
5,5,9,11: (11-5)*(9-5)=24
5,5,9,12: failure(267)
5,5,9,13: failure(268)
5,5,10,10: 5*5-10/10=24
5,5,10,11: 5*5-11+10=24
5,5,10,12: failure(269)
5,5,10,13: (5-13/5)*10=24
5,5,11,11: 5*5-11/11=24
5,5,11,12: (12-5)*5-11=24
5,5,11,13: (13+11)*5/5=24
5,5,12,12: (12+12)*5/5=24
5,5,12,13: 5*5-13+12=24
5,5,13,13: 5*5-13/13=24
5,6,6,6: (5-6/6)*6=24
5,6,6,7: 7+6+6+5=24
5,6,6,8: (8-5)*6+6=24
5,6,6,9: 9*6-6*5=24
5,6,6,10: (6-10/5)*6=24
5,6,6,11: failure(270)
5,6,6,12: (12-6)*5-6=24
5,6,6,13: failure(271)
5,6,7,7: (5-7/7)*6=24
5,6,7,8: 8*6/(7-5)=24
5,6,7,9: (7-5)*9+6=24
5,6,7,10: failure(272)
5,6,7,11: failure(273)
5,6,7,12: (7+5)*12/6=24
5,6,7,13: (13+7)*6/5=24
5,6,8,8: (5-8/8)*6=24
5,6,8,9: (9+6)*8/5=24
5,6,8,10: 8*6*5/10=24
5,6,8,11: failure(274)
5,6,8,12: (12+8)*6/5=24
5,6,8,13: (13+5)*8/6=24
5,6,9,9: (5-9/9)*6=24
5,6,9,10: 10*9/5+6=24
5,6,9,11: (11+9)*6/5=24
5,6,9,12: (12-6)*(9-5)=24
5,6,9,13: (13-5)*(9-6)=24
5,6,10,10: (10+10)*6/5=24
5,6,10,11: (11-5)*(10-6)=24
5,6,10,12: (6-12/10)*5=24
5,6,10,13: 13+10+6-5=24
5,6,11,11: (5-11/11)*6=24
5,6,11,12: 12+11+6-5=24
5,6,11,13: (13+11)*(6-5)=24
5,6,12,12: (12+12)*(6-5)=24
5,6,12,13: 13+12-6+5=24
5,6,13,13: (5-13/13)*6=24
5,7,7,7: failure(275)
5,7,7,8: failure(276)
5,7,7,9: (7+5)*(9-7)=24
5,7,7,10: (7-5)*7+10=24
5,7,7,11: (5-11/7)*7=24
5,7,7,12: failure(277)
5,7,7,13: failure(278)
5,7,8,8: (8+7)*8/5=24
5,7,8,9: 8*5-9-7=24
5,7,8,10: (7+5)*(10-8)=24
5,7,8,11: failure(279)
5,7,8,12: failure(280)
5,7,8,13: failure(281)
5,7,9,9: failure(282)
5,7,9,10: (10-7)*5+9=24
5,7,9,11: (7+5)*(11-9)=24
5,7,9,12: (9+5)*12/7=24
5,7,9,13: 13+9+7-5=24
5,7,10,10: 10*7/5+10=24
5,7,10,11: (10-5)*7-11=24
5,7,10,12: 12+10+7-5=24
5,7,10,13: (13-5)*(10-7)=24
5,7,11,11: 11+11+7-5=24
5,7,11,12: failure(283)
5,7,11,13: (7+5)*(13-11)=24
5,7,12,12: 12*7-12*5=24
5,7,12,13: failure(284)
5,7,13,13: 13+13-7+5=24
5,8,8,8: 8*8-8*5=24
5,8,8,9: 9*8/(8-5)=24
5,8,8,10: 10*8/5+8=24
5,8,8,11: failure(285)
5,8,8,12: failure(286)
5,8,8,13: 13+8+8-5=24
5,8,9,9: failure(287)
5,8,9,10: failure(288)
5,8,9,11: (11-8)*5+9=24
5,8,9,12: 12+9+8-5=24
5,8,9,13: 9*5-13-8=24
5,8,10,10: failure(289)
5,8,10,11: 11+10+8-5=24
5,8,10,12: (10+5-12)*8=24
5,8,10,13: failure(290)
5,8,11,11: failure(291)
5,8,11,12: (12-8)*(11-5)=24
5,8,11,13: (13-5)*(11-8)=24
5,8,12,12: (8-5)*12-12=24
5,8,12,13: failure(292)
5,8,13,13: failure(293)
5,9,9,9: failure(294)
5,9,9,10: failure(295)
5,9,9,11: 11+9+9-5=24
5,9,9,12: (12-9)*5+9=24
5,9,9,13: failure(296)
5,9,10,10: 10+10+9-5=24
5,9,10,11: 9*5-11-10=24
5,9,10,12: failure(297)
5,9,10,13: (13-10)*5+9=24
5,9,11,11: failure(298)
5,9,11,12: failure(299)
5,9,11,13: (13-9)*(11-5)=24
5,9,12,12: (12*9+12)/5=24
5,9,12,13: (13-5)*(12-9)=24
5,9,13,13: failure(300)
5,10,10,10: failure(301)
5,10,10,11: (11*10+10)/5=24
5,10,10,12: 12*10/(10-5)=24
5,10,10,13: (13*10-10)/5=24
5,10,11,11: 10/5+11+11=24
5,10,11,12: failure(302)
5,10,11,13: failure(303)
5,10,12,12: failure(304)
5,10,12,13: (10+5-13)*12=24
5,10,13,13: (13-10)*(13-5)=24
5,11,11,11: failure(305)
5,11,11,12: failure(306)
5,11,11,13: failure(307)
5,11,12,12: 12*12/(11-5)=24
5,11,12,13: failure(308)
5,11,13,13: failure(309)
5,12,12,12: failure(310)
5,12,12,13: failure(311)
5,12,13,13: failure(312)
5,13,13,13: failure(313)
6,6,6,6: 6+6+6+6=24
6,6,6,7: failure(314)
6,6,6,8: (6+6)*(8-6)=24
6,6,6,9: (9-6)*6+6=24
6,6,6,10: 10*6-6*6=24
6,6,6,11: (11-6)*6-6=24
6,6,6,12: (6-12/6)*6=24
6,6,6,13: failure(315)
6,6,7,7: failure(316)
6,6,7,8: failure(317)
6,6,7,9: (7+6-9)*6=24
6,6,7,10: (10-7)*6+6=24
6,6,7,11: 11*6-7*6=24
6,6,7,12: (12-7)*6-6=24
6,6,7,13: failure(318)
6,6,8,8: 8*6/(8-6)=24
6,6,8,9: (8-6)*9+6=24
6,6,8,10: (8+6-10)*6=24
6,6,8,11: (11-8)*6+6=24
6,6,8,12: 12*6-8*6=24
6,6,8,13: (13-8)*6-6=24
6,6,9,9: failure(319)
6,6,9,10: (10+6)*9/6=24
6,6,9,11: (9+6-11)*6=24
6,6,9,12: (12-9)*6+6=24
6,6,9,13: 13*6-9*6=24
6,6,10,10: failure(320)
6,6,10,11: failure(321)
6,6,10,12: (12-6)*(10-6)=24
6,6,10,13: (13-10)*6+6=24
6,6,11,11: failure(322)
6,6,11,12: 6/6+12+11=24
6,6,11,13: (13+11)*6/6=24
6,6,12,12: (12+12)*6/6=24
6,6,12,13: (13-6/6)+12=24
6,6,13,13: failure(323)
6,7,7,7: failure(324)
6,7,7,8: failure(325)
6,7,7,9: failure(326)
6,7,7,10: (7+7-10)*6=24
6,7,7,11: 7*6-11-7=24
6,7,7,12: failure(327)
6,7,7,13: failure(328)
6,7,8,8: failure(329)
6,7,8,9: 8*6/(9-7)=24
6,7,8,10: (8-6)*7+10=24
6,7,8,11: (11+7)*8/6=24
6,7,8,12: (8+6)*12/7=24
6,7,8,13: failure(330)
6,7,9,9: (9-7)*9+6=24
6,7,9,10: failure(331)
6,7,9,11: failure(332)
6,7,9,12: (9+7-12)*6=24
6,7,9,13: failure(333)
6,7,10,10: (10-7)*10-6=24
6,7,10,11: failure(334)
6,7,10,12: 12*7-10*6=24
6,7,10,13: 13+10+7-6=24
6,7,11,11: (11-6)*7-11=24
6,7,11,12: 12+11+7-6=24
6,7,11,13: (13+11)*(7-6)=24
6,7,12,12: (12+12)*(7-6)=24
6,7,12,13: 13+12-7+6=24
6,7,13,13: failure(335)
6,8,8,8: (8-6)*8+8=24
6,8,8,9: 9*8-8*6=24
6,8,8,10: (10+8)*8/6=24
6,8,8,11: (8+6-11)*8=24
6,8,8,12: 12*8/6+8=24
6,8,8,13: failure(336)
6,8,9,9: (9+9)*8/6=24
6,8,9,10: (10-8)*9+6=24
6,8,9,11: 8*6/(11-9)=24
6,8,9,12: 9*8/6+12=24
6,8,9,13: 13+9+8-6=24
6,8,10,10: failure(337)
6,8,10,11: (11-8)*10-6=24
6,8,10,12: 12+10+8-6=24
6,8,10,13: (10+6-13)*8=24
6,8,11,11: 11+11+8-6=24
6,8,11,12: 12*6/(11-8)=24
6,8,11,13: 8*6/(13-11)=24
6,8,12,12: 12*12/8+6=24
6,8,12,13: failure(338)
6,8,13,13: 13+13-8+6=24
6,9,9,9: failure(339)
6,9,9,10: 10*9/6+9=24
6,9,9,11: (11-9)*9+6=24
6,9,9,12: 12+9+9-6=24
6,9,9,13: failure(340)
6,9,10,10: failure(341)
6,9,10,11: 11+10+9-6=24
6,9,10,12: (12-10)*9+6=24
6,9,10,13: failure(342)
6,9,11,11: failure(343)
6,9,11,12: (11-9)*6+12=24
6,9,11,13: (13-11)*9+6=24
6,9,12,12: 12*6/(12-9)=24
6,9,12,13: (13-9)*(12-6)=24
6,9,13,13: failure(344)
6,10,10,10: 10+10+10-6=24
6,10,10,11: failure(345)
6,10,10,12: failure(346)
6,10,10,13: (13-10)*10-6=24
6,10,11,11: failure(347)
6,10,11,12: 12*10/(11-6)=24
6,10,11,13: failure(348)
6,10,12,12: (12-10)*6+12=24
6,10,12,13: 12*6/(13-10)=24
6,10,13,13: failure(349)
6,11,11,11: failure(350)
6,11,11,12: 12/6+11+11=24
6,11,11,13: failure(351)
6,11,12,12: (12*11+12)/6=24
6,11,12,13: (13-11)*6+12=24
6,11,13,13: failure(352)
6,12,12,12: 12*12/(12-6)=24
6,12,12,13: (13*12-12)/6=24
6,12,13,13: (13-12/6)+13=24
6,13,13,13: failure(353)
7,7,7,7: failure(354)
7,7,7,8: failure(355)
7,7,7,9: failure(356)
7,7,7,10: failure(357)
7,7,7,11: failure(358)
7,7,7,12: (7+7)*12/7=24
7,7,7,13: failure(359)
7,7,8,8: failure(360)
7,7,8,9: failure(361)
7,7,8,10: failure(362)
7,7,8,11: (7+7-11)*8=24
7,7,8,12: failure(363)
7,7,8,13: failure(364)
7,7,9,9: failure(365)
7,7,9,10: (9-7)*7+10=24
7,7,9,11: failure(366)
7,7,9,12: failure(367)
7,7,9,13: failure(368)
7,7,10,10: failure(369)
7,7,10,11: failure(370)
7,7,10,12: failure(371)
7,7,10,13: 7/7+13+10=24
7,7,11,11: failure(372)
7,7,11,12: (12-7)*7-11=24
7,7,11,13: (13+11)*7/7=24
7,7,12,12: (12+12)*7/7=24
7,7,12,13: (13-7/7)+12=24
7,7,13,13: failure(373)
7,8,8,8: failure(374)
7,8,8,9: (9-7)*8+8=24
7,8,8,10: 10*8-8*7=24
7,8,8,11: (11-7)*8-8=24
7,8,8,12: (8+7-12)*8=24
7,8,8,13: (13+8)*8/7=24
7,8,9,9: failure(375)
7,8,9,10: 9*8/(10-7)=24
7,8,9,11: failure(376)
7,8,9,12: (12+9)*8/7=24
7,8,9,13: (9+7-13)*8=24
7,8,10,10: (10-8)*7+10=24
7,8,10,11: (11+10)*8/7=24
7,8,10,12: failure(377)
7,8,10,13: 13+10+8-7=24
7,8,11,11: failure(378)
7,8,11,12: 12+11+8-7=24
7,8,11,13: (13+11)*(8-7)=24
7,8,12,12: (12+12)*(8-7)=24
7,8,12,13: 13+12-8+7=24
7,8,13,13: failure(379)
7,9,9,9: failure(380)
7,9,9,10: failure(381)
7,9,9,11: failure(382)
7,9,9,12: failure(383)
7,9,9,13: 13+9+9-7=24
7,9,10,10: failure(384)
7,9,10,11: (11-9)*7+10=24
7,9,10,12: 12+10+9-7=24
7,9,10,13: failure(385)
7,9,11,11: 11+11+9-7=24
7,9,11,12: (11+7)*12/9=24
7,9,11,13: failure(386)
7,9,12,12: 12*9-12*7=24
7,9,12,13: failure(387)
7,9,13,13: 13+13-9+7=24
7,10,10,10: failure(388)
7,10,10,11: 11+10+10-7=24
7,10,10,12: (12-10)*7+10=24
7,10,10,13: failure(389)
7,10,11,11: failure(390)
7,10,11,12: failure(391)
7,10,11,13: (13-11)*7+10=24
7,10,12,12: 12*10/(12-7)=24
7,10,12,13: (13+7)*12/10=24
7,10,13,13: failure(392)
7,11,11,11: failure(393)
7,11,11,12: failure(394)
7,11,11,13: failure(395)
7,11,12,12: failure(396)
7,11,12,13: failure(397)
7,11,13,13: failure(398)
7,12,12,12: failure(399)
7,12,12,13: (13*12+12)/7=24
7,12,13,13: failure(400)
7,13,13,13: failure(401)
8,8,8,8: failure(402)
8,8,8,9: failure(403)
8,8,8,10: (10-8)*8+8=24
8,8,8,11: 11*8-8*8=24
8,8,8,12: (12-8)*8-8=24
8,8,8,13: (8+8-13)*8=24
8,8,9,9: failure(404)
8,8,9,10: failure(405)
8,8,9,11: (11-9)*8+8=24
8,8,9,12: 12*8-9*8=24
8,8,9,13: (13-9)*8-8=24
8,8,10,10: failure(406)
8,8,10,11: failure(407)
8,8,10,12: (12-10)*8+8=24
8,8,10,13: 13*8-10*8=24
8,8,11,11: failure(408)
8,8,11,12: 8/8+12+11=24
8,8,11,13: (13+11)*8/8=24
8,8,12,12: (12+12)*8/8=24
8,8,12,13: (13-8/8)+12=24
8,8,13,13: failure(409)
8,9,9,9: failure(410)
8,9,9,10: failure(411)
8,9,9,11: failure(412)
8,9,9,12: 9*8/(12-9)=24
8,9,9,13: failure(413)
8,9,10,10: failure(414)
8,9,10,11: failure(415)
8,9,10,12: 12*10/8+9=24
8,9,10,13: 13+10+9-8=24
8,9,11,11: (11-8)*11-9=24
8,9,11,12: 12+11+9-8=24
8,9,11,13: (13+11)*(9-8)=24
8,9,12,12: (12+12)*(9-8)=24
8,9,12,13: 13+12-9+8=24
8,9,13,13: failure(416)
8,10,10,10: failure(417)
8,10,10,11: failure(418)
8,10,10,12: 12+10+10-8=24
8,10,10,13: failure(419)
8,10,11,11: 11+11+10-8=24
8,10,11,12: failure(420)
8,10,11,13: failure(421)
8,10,12,12: 12*10-12*8=24
8,10,12,13: 12*10/(13-8)=24
8,10,13,13: 13+13-10+8=24
8,11,11,11: failure(422)
8,11,11,12: failure(423)
8,11,11,13: failure(424)
8,11,12,12: (11-8)*12-12=24
8,11,12,13: failure(425)
8,11,13,13: failure(426)
8,12,12,12: failure(427)
8,12,12,13: failure(428)
8,12,13,13: failure(429)
8,13,13,13: failure(430)
9,9,9,9: failure(431)
9,9,9,10: failure(432)
9,9,9,11: failure(433)
9,9,9,12: (9+9)*12/9=24
9,9,9,13: failure(434)
9,9,10,10: failure(435)
9,9,10,11: failure(436)
9,9,10,12: failure(437)
9,9,10,13: 9/9+13+10=24
9,9,11,11: failure(438)
9,9,11,12: (12-9)*11-9=24
9,9,11,13: (13+11)*9/9=24
9,9,12,12: (12+12)*9/9=24
9,9,12,13: (13-9)*9-12=24
9,9,13,13: failure(439)
9,10,10,10: failure(440)
9,10,10,11: failure(441)
9,10,10,12: failure(442)
9,10,10,13: 13+10+10-9=24
9,10,11,11: failure(443)
9,10,11,12: 12+11+10-9=24
9,10,11,13: (13+11)*(10-9)=24
9,10,12,12: (12+12)*(10-9)=24
9,10,12,13: 13+12-10+9=24
9,10,13,13: failure(444)
9,11,11,11: 11+11+11-9=24
9,11,11,12: failure(445)
9,11,11,13: failure(446)
9,11,12,12: 12*11-12*9=24
9,11,12,13: (13+9)*12/11=24
9,11,13,13: 13+13-11+9=24
9,12,12,12: (12-9)*12-12=24
9,12,12,13: failure(447)
9,12,13,13: failure(448)
9,13,13,13: failure(449)
10,10,10,10: failure(450)
10,10,10,11: failure(451)
10,10,10,12: (10+10)*12/10=24
10,10,10,13: 10/10+13+10=24
10,10,11,11: failure(452)
10,10,11,12: 10/10+12+11=24
10,10,11,13: (13+11)*10/10=24
10,10,12,12: (12+12)*10/10=24
10,10,12,13: (13-10/10)+12=24
10,10,13,13: failure(453)
10,11,11,11: failure(454)
10,11,11,12: 12+11+11-10=24
10,11,11,13: (13+11)*(11-10)=24
10,11,12,12: (12+12)*(11-10)=24
10,11,12,13: 13+12-11+10=24
10,11,13,13: failure(455)
10,12,12,12: 12*12-12*10=24
10,12,12,13: (13-10)*12-12=24
10,12,13,13: 13+13-12+10=24
10,13,13,13: 13/13+13+10=24
11,11,11,11: failure(456)
11,11,11,12: 11/11+12+11=24
11,11,11,13: (13+11)*11/11=24
11,11,12,12: (12+12)*11/11=24
11,11,12,13: (13+11)*(12-11)=24
11,11,13,13: failure(457)
11,12,12,12: (12+12)*(12-11)=24
11,12,12,13: 13*12-12*11=24
11,12,13,13: 13/13+12+11=24
11,13,13,13: 13*13/13+11=24
12,12,12,12: (12+12)*12/12=24
12,12,12,13: (13-12)*12+12=24
12,12,13,13: 13*12/13+12=24
12,13,13,13: (13+13)*12/13=24
13,13,13,13: failure(458)

2010-11-11 19:21
yu_hua
Rank: 2
等 级:论坛游民
帖 子:222
专家分:95
注 册:2006-8-10
收藏
得分:0 
/*------------------------------
【原创】24点游戏程序之二
-- 最简短的、仅52行代码

-------------------------------*/
#define  TOP 10  //设定牌的最大点数,可改成其它数字
#include <stdio.h>
#include <math.h>
int quan_pai_lie(int a[],int n)//全排列函数
//从初始时的升序排列到结束前的降序排列
//每调用一次该函数,就给出一个新的排列
{   int i,j,k,temp;
    for(k=n-1;k>0;k--)
     if(a[k-1]<a[k])break;
    if(k==0)return 0;//0:排列已尽
    temp=a[k-1];i=k;
    for(j=k+1;j<n;j++)
     if(temp<a[j]&&a[j]<a[i])i=j;
    a[k-1]=a[i];a[i]=temp;
    for(i=k;i<n-1;i++)
    for(j=k;j<n-1+k-i;j++)
     if(a[j+1]<a[j])
     temp=a[j],a[j]=a[j+1],a[j+1]=temp;
    return 1;//1:排列未尽
}
double op(double x, int opi, double y)//定义5种运算
{   if(opi==1)return x+y;
    if(opi==2)return fabs(x-y);
    if(opi==3)return x*y;      //乘法
    if(opi==4 && y)return x/y; //除法
    if(opi==5 && x)return y/x; //反除
    else return -999999999999; //异常出口
}
int main( void )
{    int i,j,k,L,p[4],op1,op2,op3,noslv=0,total=0;
//    printf("please input 4 numbers(1 - 10): ");
//    scanf("%d %d %d %d",&i,&j,&k,&L);//请从小到大输入之
    printf("无解出牌组如下\n");
    for(i=1;i<=TOP;i++)
    for(j=i;j<=TOP;j++)
    for(k=j;k<=TOP;k++)
    for(L=k;L<=TOP;L++)
    {    total++;
        p[0]=i,p[1]=j,p[2]=k,p[3]=L;
        do{
        for(op3=1;op3<=4;op3++)
        for(op2=1;op2<=4;op2++)
        for(op1=1;op1<=4;op1++)
        if(fabs(24-op(op(p[0],op1,p[1]),op3,op(p[2],op2,p[3])))<1E-8)goto success;
        for(op3=1;op3<=5;op3++)
        for(op2=1;op2<=4;op2++)
        for(op1=1;op1<=4;op1++)
        if(fabs(24-op(op(op(p[0],op1,p[1]),op2,p[2]),op3,p[3]))<1E-8)goto success;
        }while(quan_pai_lie(p,4));//每调用1次给出1个排列
        printf("%d,%d,%d,%d \t(%d)\n",i,j,k,L,++noslv);
        success:;
    }   printf("共有%d种出牌,除%d种无解外,其余都可通过加减乘除得到24。\n",total,noslv);
    return 0;
}
/*运行情况
无解出牌组如下
1,1,1,1         (1)
1,1,1,2         (2)
1,1,1,3         (3)
1,1,1,4         (4)
1,1,1,5         (5)
1,1,1,6         (6)
1,1,1,7         (7)
1,1,1,9         (8)
1,1,1,10        (9)
1,1,2,2         (10)
1,1,2,3         (11)
1,1,2,4         (12)
1,1,2,5         (13)
1,1,3,3         (14)
1,1,5,9         (15)
1,1,5,10        (16)
1,1,6,7         (17)
1,1,6,10        (18)
1,1,7,7         (19)
1,1,7,8         (20)
1,1,7,9         (21)
1,1,8,9         (22)
1,1,8,10        (23)
1,1,9,9         (24)
1,1,9,10        (25)
1,1,10,10       (26)
1,2,2,2         (27)
1,2,2,3         (28)
1,2,9,9         (29)
1,2,9,10        (30)
1,2,10,10       (31)
1,3,5,5         (32)
1,4,7,10        (33)
1,4,8,10        (34)
1,4,9,9         (35)
1,5,5,7         (36)
1,5,5,8         (37)
1,5,7,7         (38)
1,6,6,7         (39)
1,6,7,7         (40)
1,6,7,8         (41)
1,6,10,10       (42)
1,7,7,7         (43)
1,7,7,8         (44)
1,7,10,10       (45)
1,8,9,9         (46)
1,8,9,10        (47)
1,8,10,10       (48)
1,9,9,9         (49)
1,9,9,10        (50)
1,9,10,10       (51)
1,10,10,10      (52)
2,2,2,2         (53)
2,2,2,6         (54)
2,2,7,9         (55)
2,2,9,9         (56)
2,3,3,4         (57)
2,5,5,5         (58)
2,5,5,6         (59)
2,5,9,9         (60)
2,6,7,7         (61)
2,7,7,7         (62)
2,7,7,9         (63)
2,7,8,10        (64)
2,7,9,9         (65)
2,9,9,9         (66)
2,9,9,10        (67)
2,10,10,10      (68)
3,3,4,10        (69)
3,3,5,8         (70)
3,3,7,10        (71)
3,3,10,10       (72)
3,4,6,7         (73)
3,4,8,8         (74)
3,4,9,10        (75)
3,5,5,5         (76)
3,5,5,10        (77)
3,5,7,7         (78)
3,5,8,10        (79)
3,7,8,10        (80)
3,10,10,10      (81)
4,4,5,9         (82)
4,4,6,6         (83)
4,4,6,7         (84)
4,4,9,9         (85)
4,4,9,10        (86)
4,7,7,9         (87)
4,7,7,10        (88)
4,9,9,9         (89)
4,9,10,10       (90)
4,10,10,10      (91)
5,5,5,7         (92)
5,5,5,8         (93)
5,5,5,10        (94)
5,5,6,9         (95)
5,5,6,10        (96)
5,5,7,9         (97)
5,6,7,10        (98)
5,7,7,7         (99)
5,7,7,8         (100)
5,7,9,9         (101)
5,8,9,9         (102)
5,8,9,10        (103)
5,8,10,10       (104)
5,9,9,9         (105)
5,9,9,10        (106)
5,10,10,10      (107)
6,6,6,7         (108)
6,6,7,7         (109)
6,6,7,8         (110)
6,6,9,9         (111)
6,6,10,10       (112)
6,7,7,7         (113)
6,7,7,8         (114)
6,7,7,9         (115)
6,7,8,8         (116)
6,7,9,10        (117)
6,8,10,10       (118)
6,9,9,9         (119)
6,9,10,10       (120)
7,7,7,7         (121)
7,7,7,8         (122)
7,7,7,9         (123)
7,7,7,10        (124)
7,7,8,8         (125)
7,7,8,9         (126)
7,7,8,10        (127)
7,7,9,9         (128)
7,7,10,10       (129)
7,8,8,8         (130)
7,8,9,9         (131)
7,9,9,9         (132)
7,9,9,10        (133)
7,9,10,10       (134)
7,10,10,10      (135)
8,8,8,8         (136)
8,8,8,9         (137)
8,8,9,9         (138)
8,8,9,10        (139)
8,8,10,10       (140)
8,9,9,9         (141)
8,9,9,10        (142)
8,9,10,10       (143)
8,10,10,10      (144)
9,9,9,9         (145)
9,9,9,10        (146)
9,9,10,10       (147)
9,10,10,10      (148)
10,10,10,10     (149)
共有715种出牌,除149种无解外,其余都可通过加减乘除得到24。
*/
2010-11-16 10:04
yu_hua
Rank: 2
等 级:论坛游民
帖 子:222
专家分:95
注 册:2006-8-10
收藏
得分:0 
/*------------------------------
【原创】24点游戏程序之三
--更简短、仅30多行代码

-------------------------------*/
#include<stdio.h>
#include <math.h>

int MAX=10;//扑克牌的最大点数10,可改别的数字,如13等

double op(double x,int iop,double y)
{   if(iop==1)return x+y;
    if(iop==2)return fabs(x-y); //总让大减小
    if(iop==3)return x*y;
    if(iop==4)return y?x/y:-9999; //避免零除
    else      return x?y/x:-9999; //避免零除
}

int main( void )
{   int p[5],op1,op2,op3,m,noslv=0,S[]={ //24种全排列对应的下标变量
    1,2,3,4,1,2,4,3,1,3,2,4,1,3,4,2,1,4,2,3,1,4,3,2, 2,1,3,4,2,1,4,3,2,3,1,4,2,3,4,1,2,4,1,3,2,4,3,1,
    3,1,2,4,3,1,4,2,3,2,1,4,3,2,4,1,3,4,1,2,3,4,2,1, 4,1,2,3,4,1,3,2,4,2,1,3,4,2,3,1,4,3,1,2,4,3,2,1};
    for(p[1]=  1 ;p[1]<=MAX;p[1]++) //全
    for(p[2]=p[1];p[2]<=MAX;p[2]++) //盘
    for(p[3]=p[2];p[3]<=MAX;p[3]++) //搜
    for(p[4]=p[3];p[4]<=MAX;p[4]++) //索
    {  for( m=0; m<4*2*3*4; m+=4 )  //试探4张牌的24种全排列
       {  int a=p[S[m+0]],b=p[S[m+1]]; //也可定义为double型
          int c=p[S[m+2]],d=p[S[m+3]]; //也可定义为double型
          for(op1=1;op1<=4;op1++) //op1: 加减乘除共4种
          for(op2=1;op2<=4;op2++) //op2: 加减乘除共4种
          for(op3=0;op3<=4;op3++) //op3: 加减乘除还有“反除”共5种
          {  if(fabs(op(op(a,op1,b),op3,op(c,op2,d))-24)<1e-8)goto suc;//类似(7-3)*(8-2)
             if(fabs(op(op(op(a,op1,b),op2,c),op3,d)-24)<1e-8)goto suc;//类似(10-2)*9/3
          }
       }
       printf("%d,%d,%d,%d: no solution (%d)\n",p[1],p[2],p[3],p[4],++noslv);//打印无效组合及编号
       suc: continue; //进入下一个出牌组合
    }  getchar(); //避免屏幕一闪而过
    return 0;
}

[ 本帖最后由 yu_hua 于 2010-11-17 20:04 编辑 ]
2010-11-17 19:57
yu_hua
Rank: 2
等 级:论坛游民
帖 子:222
专家分:95
注 册:2006-8-10
收藏
得分:0 
/* 以下代码(120行)给出24点游戏全部独立解 */
#include<stdio.h>
int MAX=13;//扑克牌的最大点数
int way;
void print(char *format,int a,char o1,int b,char o2,int c,char o3,int d)
{    way++;
     if(way==1)printf("\n");
     printf(format,a,o1,b,o2,c,o3,d);
}
int OP(int x,int iop,int y)
{   if(iop==1)return x>=y ? x+y:-9999;
    if(iop==2)return x>=y ? x-y:-9999;
    if(iop==3)return x>=y ? x*y:-9999;
    if(iop==4)if(y && y-1 && x%y==0)return x/y;
    return -9999;
}
int op(int x,int iop,int y)
{   if(iop==1)return x+y;else
    if(iop==3)return x*y;else
    return OP(x,iop,y);
}
int quan_pai_lie(int a[],int n)
{ //from 54321 to 12345
    int i,j,k,temp,t;
    for(k=n-1;k>0;k--)
     if(a[k-1]>a[k])break;
    if(k==0)return 0;
    temp=a[k-1];i=k;
    for(j=k+1;j<n;j++)
     if(temp>a[j]&&a[j]>a[i])i=j;
    a[k-1]=a[i];a[i]=temp;
    for(i=k;i<n-1;i++)
    for(j=k;j<n-1+k-i;j++)
      if(a[j+1]>a[j])
      {t=a[j];a[j]=a[j+1];a[j+1]=t;}
    return 1;
}
#define DO(I,a1,a2, J,m1,m2, K,z1,z2) for(K=z1;K<=z2;K++)for(J=m1;J<=m2;J++)for(I=a1;I<=a2;I++)
int main(void)
{   int p[5],A[5],noslv=0;
    int a,b,c,d,op1,op2,op3;
   char os[]=" +-*/";
    for(p[1]=  1 ;p[1]<=MAX;p[1]++) //全
    for(p[2]=p[1];p[2]<=MAX;p[2]++) //面
    for(p[3]=p[2];p[3]<=MAX;p[3]++) //搜
    for(p[4]=p[3];p[4]<=MAX;p[4]++) //索
    {
       A[4]=p[1],A[3]=p[2],A[2]=p[3],A[1]=p[4];
       a=A[1];b=A[2];c=A[3];d=A[4]; way=0;
       printf("%d,%d,%d,%d: ",p[1],p[2],p[3],p[4]);
       if(a==13 && b==13 && c==12 && d==12) //K-K+Q+Q
          print("%d%c%d%c%d%c%d=24\n",a,os[2],b,os[1],c,os[1],d);
       DO(op1,1,2, op2,1,2, op3,1,2) {//此法唯一遗漏K-K+Q+Q
          if(OP(OP(OP(a,op1,b),op2,c),op3,d)==24) //a+b+c+d,a+b+c-d,a+b-c-d
          if( !(op2==2 && op3==1 && c==d) )
             print("%d%c%d%c%d%c%d=24\n",a,os[op1],b,os[op2],c,os[op3],d);
       }
       DO(op1,3,4, op2,3,4, op3,3,4) {//abcd, abc/d, ab/c/d
          if(OP(OP(OP(a,op1,b),op2,c),op3,d)==24) {
             if( !(op2==4 && op3==3 && c==d) &&
                 !(op1==4 && op3==3 && d==b) &&
                 !(op1==4 && op2==3 && b==c) )
                 print("%d%c%d%c%d%c%d=24\n",a,os[op1],b,os[op2],c,os[op3],d);
             }
          else if(b-c && OP(OP(OP(a,op1,c),op2,d),op3,b)==24 && op3==4)
             print("%d%c%d%c%d%c%d=24\n",a,os[op1],c,os[op2],d,os[op3],b);
          else if(a-b && OP(OP(OP(b,op1,c),op2,d),op3,a)==24 && op3==4)
             print("%d%c%d%c%d%c%d=24\n",b,os[op1],c,os[op2],d,os[op3],a);
       }
       do
       {   a=A[1];b=A[2];c=A[3];d=A[4];
           DO(op1,1,2, op2,1,2, op3,0,0) {//(a±b±c)*d
              if(OP(OP(a,op1,b),op2,c)*d==24 && !(op1==2 && op2==1) && !(op1==op2 && b<c))
                 print("(%d%c%d%c%d)%c%d=24\n",a,os[op1],b,os[op2],c,os[3],d);
           }
           if(op(OP(a,3,b),1,c)*d==24)print("(%d%c%d%c%d)%c%d=24\n",a,os[3],b,os[1],c,os[3],d); //(a*b+c)*d
           if(op(OP(a,3,b),2,c)*d==24)print("(%d%c%d%c%d)%c%d=24\n",a,os[3],b,os[2],c,os[3],d); //(a*b-c)*d
           DO(op1,1,2, op2,0,0, op3,1,4) {
           if(op(OP(a,op1,b)*c,op3,d)==24 && !(op3==3 && c<d)) //(a±b)*c±d,(a±b)*c*d,(a±b)*c/d
              print("(%d%c%d)%c%d%c%d=24\n",a,os[op1],b,os[3],c,os[op3],d);
           if(op(OP(OP(a,op1,b),4,c),op3,d)==24 && op3<3) //(a±b)/c±d
              print("(%d%c%d)%c%d%c%d=24\n",a,os[op1],b,os[4],c,os[op3],d);
           }
           DO(op1,3,4, op2,1,4, op3,1,2) {//a*b±c±d, a/b±c±d, a*b*c±d, a*b/c±d
              if(op(op(OP(a,op1,b),op2,c),op3,d)==24 && !(op2==op3 && c<d) && !(op2==2 && op3==1)
                 && !(op1*op2==9 && b<c) && !(op1==4 && op2==3)){
                 print("%d%c%d%c%d%c%d=24\n",a,os[op1],b,os[op2],c,os[op3],d);
                 if(b==1 && op2<3||c==1 && op1==3)goto next;    }
           }
           next:
           if(op(op(OP(a,3,b),1,c),4,d)==24)print("(%d%c%d%c%d)%c%d=24\n",a,os[3],b,os[1],c,os[4],d); //(a*b+c)/d
           if(op(op(OP(a,3,b),2,c),4,d)==24)print("(%d%c%d%c%d)%c%d=24\n",a,os[3],b,os[2],c,os[4],d); //(a*b-c)/d
           if(op(OP(c,2,OP(a,3,b)),3,d)==24)print("(%d%c%d%c%d)%c%d=24\n",c,os[2],a,os[3],b,os[3],d); //(c-a*b)*d
           DO(op1,1,2, op2,1,2, op3,0,0) {
              if(OP(OP(a,op1,b),3,OP(c,op2,d))==24)           //(a±b)*(c±d)
                 print("(%d%c%d)%c(%d%c%d)=24\n",a,os[op1],b,os[3],c,os[op2],d);
              if(OP(OP(a,op1,b),op2,OP(c,4,d))==24 && op2==2) //(a±b)-(c/d)
                 print("%d%c%d%c%d%c%d=24\n",a,os[op1],b,os[op2],c,os[4],d);
           }
           DO(op1,0,0, op2,1,2, op3,3,4) {
              if(OP(OP(a,3,b),op2,OP(c,op3,d))==24) //(a*b)±(c*d), (a*b)±(c/d)
                 print("%d%c%d%c%d%c%d=24\n",a,os[3],b,os[op2],c,os[op3],d);
              if(op3==4 && OP(OP(a,3,b),op3,OP(c,op2,d))==24)     //(a*b)/(c±d)
                 print("%d%c%d%c(%d%c%d)=24\n",a,os[3],b,os[op3],c,os[op2],d);
           }
           // 以下涉及实型除法
           for(op2=1;op2<=2;op2++)    //(a/b±c)*d
              if(op(a,op2,b*c)*d==24*b && b-1)
                 print("(%d%c%d%c%d)%c%d=24\n",a,os[4],b,os[op2],c,os[3],d);
           if((b*c-a)*d==24*b && b-1) //(c-a/b)*d
              print("(%d%c%d%c%d)%c%d=24\n",c,os[2],a,os[4],b,os[3],d);
           if(d*b==(c*b-a)*24)        //d/(c-a/b)
              print("%d%c(%d%c%d%c%d)=24\n",d,os[4],c,os[2],a,os[4],b);
           if(d*b==(a-c*b)*24)        //d/(a/b±c)
              print("%d%c(%d%c%d%c%d)=24\n",d,os[4],a,os[4],b,os[2],c);
       }
       while(quan_pai_lie(A+1,4));
       if(!way)printf("failure(%d)\n",++noslv);//无效组合编号 458 for K
    }
    return(0);
}

2010-11-21 18:15
yu_hua
Rank: 2
等 级:论坛游民
帖 子:222
专家分:95
注 册:2006-8-10
收藏
得分:0 
以下是引用御坂美琴在2010-11-21 19:28:59的发言:

我有兴趣的是,你能排除掉1*2*3*4与4*3*2*1这种类似的等价解么
还有(3 + 9) * 2 * 1 与 (3 * 1 + 9) * 2
能排除掉1*2*3*4与4*3*2*1这种类似的等价解
目前还不能排除“*1”引起的诸如
(3 + 9) * 2 * 1 与 (3 * 1 + 9) * 2 的等价解
除非延长代码。
2010-11-21 19:43
yu_hua
Rank: 2
等 级:论坛游民
帖 子:222
专家分:95
注 册:2006-8-10
收藏
得分:0 
以下是21楼程序的部分输出。不难看出,该版主要的不理想之处
就是“*1”泛滥成灾!但是“/1”已经被代码禁止住了。。。。
1,1,1,12:
(1+1)*12*1=24
(1*1+1)*12=24 严格说此行与上一行属于同一个解
1,1,2,6:
(2+1+1)*6=24
(1+1)*6*2=24
1,1,2,8:
(2+1)*8*1=24
(2*1+1)*8=24 严格说此行与上一行属于同一个解
(1*1+2)*8=24 严格说此行与上一行也属于同一解
1,1,2,10:
(10+2)*(1+1)=24
(10+1+1)*2=24
1,1,2,11:
11*2+1+1=24
(11+1)*2*1=24
(11*1+1)*2=24 严格说此行与上一行属于同一个解
(1*1+11)*2=24 严格说此行与上一行属于同一个解
(1+1)*11+2=24
1,1,2,12:
12*2*1*1=24 代码已禁止“2*1*1*12”等
12*2+1-1=24 代码已禁止“12*2-1+1”
(12+1-1)*2=24
(2+1-1)*12=24
12/(1-1/2)=24
1,1,2,13:
13*2-1-1=24
(13-1)*2*1=24
(13*1-1)*2=24 严格说此行与上一行属于同一个解
(13-1*1)*2=24 严格说此行与上一行属于同一个解
(1+1)*13-2=24
1,1,3,6:
(6+1+1)*3=24
(3+1)*6*1=24
(3*1+1)*6=24 严格说此行与上一行属于同一个解
(1*1+3)*6=24 严格说此行与上一行属于同一个解
1,1,3,7:
(7+1)*3*1=24
(7*1+1)*3=24 严格说此行与上一行属于同一个解
(1*1+7)*3=24 严格说此行与上一行属于同一个解
(7-1)*(3+1)=24
1,1,3,8:
8*3*1*1=24
8*3+1-1=24
(8+1-1)*3=24
(3+1-1)*8=24
1,1,3,9:
(9+3)*(1+1)=24
(9-1)*3*1=24
(9*1-1)*3=24 严格说此行与上一行属于同一个解
(9-1*1)*3=24 严格说此行与上一行属于同一个解
。。。。。。。。。。。。。。。。。。。。。。
1,1,4,4:
(4+1+1)*4=24 代码已禁止“(1+4+1)*4”及“4*(4+1+1)”等的出现
。。。。。。。。。。。。。。。。。。。。。。
1,1,4,8:
(8+4)*(1+1)=24
(8-1-1)*4=24
(4-1)*8*1=24
(4*1-1)*8=24
(4-1*1)*8=24
1,1,4,9:
(9-1)*(4-1)=24
1,1,4,10:
(1+1)*10+4=24
1,1,4,12:
12*4/(1+1)=24
(4-1-1)*12=24
1,1,5,5:
(5*5-1)*1=24
5*5*1-1=24
5*5-1*1=24
(5+1)*(5-1)=24
1,1,5,6:
(6-1)*5-1=24
(5-1)*6*1=24
(5*1-1)*6=24
(5-1*1)*6=24
1,1,5,7:
(7+5)*(1+1)=24
(7-1)*(5-1)=24
1,1,5,8:
(5-1-1)*8=24
1,1,6,6:
(6+6)*(1+1)=24
(6-1-1)*6=24
1,1,6,8:
8*6/(1+1)=24
1,1,6,9:
(1+1)*9+6=24
1,1,6,12:
(1+1)*6+12=24
1,1,7,10:
(1+1)*7+10=24
1,1,8,8:
(1+1)*8+8=24
1,1,9,13:
13+9+1+1=24 代码已禁止“1+9+1+13”等
1,1,10,12:
12+10+1+1=24
1,1,10,13: 以下7行最能暴露21楼代码的不足
(13+10+1)*1=24
(13+10)*1+1=24
13*1+10+1=24
(13+1)*1+10=24
10*1+13+1=24
(10+1)*1+13=24
1*1+13+10=24
1,1,11,11:
11+11+1+1=24
1,1,11,12:
(12+11+1)*1=24
(12+11)*1+1=24
12*1+11+1=24
(12+1)*1+11=24
11*1+12+1=24
(11+1)*1+12=24
1*1+12+11=24
1,1,11,13:
13+11+1-1=24
(13+11)*1*1=24
(13*1+11)*1=24
13*1+11*1=24
13*1*1+11=24
(11*1+13)*1=24
11*1*1+13=24
1,1,12,12:
12+12+1-1=24
(12+12)*1*1=24
(12*1+12)*1=24
12*1+12*1=24
12*1*1+12=24
1,1,12,13:
(13+12-1)*1=24
(13+12)*1-1=24
13*1+12-1=24
(13-1)*1+12=24
12*1+13-1=24
(12-1)*1+13=24
1,1,13,13:
13+13-1-1=24

1,2,2,4:
(2+1)*4*2=24
1,2,2,5:
(5+1)*2*2=24
(5+1)*(2+2)=24
1,2,2,6:
6*2*2*1=24
(6+2)*(2+1)=24
(2+2)*6*1=24
(2*1+2)*6=24
1,2,2,7: 以下两式代表同一个算法吗?
(7-1)*2*2=24
(7-1)*(2+2)=24

1,2,2,8: 以下两式代表同一个算法吗?
(2+2-1)*8=24
(2*2-1)*8=24

1,2,2,9:
(9+2+1)*2=24
1,2,2,10:
(10+2)*2*1=24
(10-2)*(2+1)=24
(10*1+2)*2=24
(10+1)*2+2=24
(2*1+10)*2=24
1,2,2,11:
(11*2+2)*1=24
11*2+2*1=24
(11+2-1)*2=24
11*2*1+2=24
1,2,2,12:
(12-1)*2+2=24
(12+1)*2-2=24
(2/2+1)*12=24
(2-1)*12*2=24
1,2,2,13:
(13*2-2)*1=24
13*2-2*1=24
13*2*1-2=24
(13+1-2)*2=24
1,2,3,3:
(3+1)*3*2=24
1,2,3,4:
4*3*2*1=24
(4+2)*(3+1)=24
(3+2+1)*4=24

1,2,3,5:
(5+3)*(2+1)=24
(5+2+1)*3=24
(5-1)*3*2=24
(3+2)*5-1=24
1,2,3,6:
(6+2)*3*1=24
(6*1+2)*3=24
(3+2-1)*6=24
(3-1)*6*2=24
(2*1+6)*3=24
1,2,3,7:
7*3+2+1=24
(7+2-1)*3=24
(2+1)*7+3=24
1,2,3,8:
(8+3+1)*2=24
(8-2)*(3+1)=24
8/(1-2/3)=24
(2-1)*8*3=24
1,2,3,9:
(9+3)*2*1=24
9*3-2-1=24
(9*1+3)*2=24
(9+1-2)*3=24
(3*1+9)*2=24
(2+1)*9-3=24
1,2,3,10:
(10+3-1)*2=24
(10-2)*3*1=24
10*2+3+1=24
(10+2)*(3-1)=24
(10*1-2)*3=24
(10-2*1)*3=24
1,2,3,11:
(11-3)*(2+1)=24
11*2+3-1=24
(11-2-1)*3=24
(3-1)*11+2=24
1,2,3,12:
12/(3/2-1)=24
(3+1)*12/2=24
(3+1-2)*12=24
1,2,3,13:
13*2+1-3=24
(3-1)*13-2=24
2010-11-22 21:08
快速回复:【原创】24点游戏程序之一
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.039992 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved