[code]public class Demo1 {
public static void main(String[] args) {
// TODO Auto-generated method stub
int i = 0, temp = 0;
while(true){
i++;
temp = sumFunciton(i);
if((i + temp) == 28){
break;
}
}
System.out.println(i);
}
public static int sumFunciton(int i){
int sum = 0,temp = 0;
while(true){
temp = i/3;
sum = sum + temp;
if(temp<3){
return sum;
}
i = temp;
}
}
}
[/code之前写的不对 |