急急//,数学高手进入小猪胖胖发
我做了个程序,验证了,就这两个。
主程序如下(java程序):
package count;
public class AndyTestCount {
String haved="4",ss;
int i=3,sss;
boolean test(int y,int z){
haved="4";
for(i=3;i>=0;i--){
sss=y/1000;
ss= lueOf(sss);
if(sss==0)
return false;
if( dexOf(ss)!=-1)
return false;
else
haved=haved+ lueOf(sss);
y=(y-sss*1000)*...全部
我做了个程序,验证了,就这两个。
主程序如下(java程序):
package count;
public class AndyTestCount {
String haved="4",ss;
int i=3,sss;
boolean test(int y,int z){
haved="4";
for(i=3;i>=0;i--){
sss=y/1000;
ss= lueOf(sss);
if(sss==0)
return false;
if( dexOf(ss)!=-1)
return false;
else
haved=haved+ lueOf(sss);
y=(y-sss*1000)*10;
sss=z/1000;
ss= lueOf(sss);
if(sss==0)
return false;
if( dexOf(ss)!=-1)
return false;
else
haved=haved+ lueOf(sss);
z=(z-sss*1000)*10;
}
return true;
}
public void main1()
{
AndyTestCount aa = new AndyTestCount();
int y=1000,z;
while(y++<2500){
z=y*4;
if(aa。
test(y,z))
intln(""+y+"*4="+z);
}
intln("Hello World!");
}
}
。收起