#define TOTAL 100void baiduji{int numBig, numMiddle, numSmall;int moneyBig, moneyMiddle, moneySmall,totalMoney;for numBig = 0; numBig != 33; ++numBig{fornumMiddle=0;numMiddle != 50; ++numMiddle{numSmall = TOTAL - numMiddle - numBig;if numSmall%3 != 0continue;else{moneySmall = numSmall/3;moneyBig = numBig * 3;moneyMiddle = numMiddle * 2;totalMoney = moneyBig + moneyMiddle + moneySmall;iftotalMoney == TOTALprintf"BIG:",numBig,numMiddle,numSmall;}}}}void intimateNum{int a,i,b,n;fora=10;a<100;a++ /*穷举10-100以内的全部整数*/{forb=0,i=1;i<=a/2;i++ /*a的各因子之和存放于b*/if!a%i b+=i; forn=0,i=1;i<=b/2;i++ /*b的各因子之和存于n*/if!b%i n+=i; ifn==a&&a
黄益生2019-12-21 18:57:16