public static int[] getArray(int[] arr) {
int count=0;
for (int i =0;i<arr.length ;i++ ) {
int units = arr%10; //找到个位units
int decade = arr/10%10; //找到十位decade
int hundred = arr/100%10; //找到百位hundred
int kbps = arr/1000; //找到千位kbps
int num = units+hundred;
int num2 = decade+kbps;
if(num==num2){
return arr;
}
}
}为什么不行 |