求助,为什么只与60分?

P1618 三连击(升级版)

xzit20190507121 @ 2019-11-02 21:39:05

#include<stdio.h>
int main(){
    int A,B,C;
    scanf("%d%d%d",&A,&B,&C);
    int a[10],num1,num2,num3,t=0;
    for(num1=192;num1<329;num1++){
        num2=num1*B/A;
        num3=num1*C/A;
        a[0]=num1/100;
        a[1]=num1/10%10;
        a[2]=num1%10;
        a[3]=num2/100;
        a[4]=num2/10%10;
        a[5]=num2%10;
        a[6]=num3/100;
        a[7]=num3/10%10;
        a[8]=num3%10;
        if(a[0]+a[1]+a[2]+a[3]+a[4]+a[5]+a[6]+a[7]+a[8]==1+2+3+4+5+6+7+8+9&&
        a[0]*a[1]*a[2]*a[3]*a[4]*a[5]*a[6]*a[7]*a[8]==1*2*3*4*5*6*7*8*9){
            printf("%d %d %d",num1,num2,num3);
            t=num1;
            printf("\n");
        }
    }
    if(t==0){
        printf("No!!!");
    }
    return 0;
}

by L_sdcs @ 2019-11-06 15:13:27

毒瘤数据问题

如442 549 917


|