- 博客(2)
- 收藏
- 关注
原创 2021-08-16
numArray是一个int类型数组,依次升序存放几个数字,要求输出其中数字组成的最大数。 第一种: int sum = 0; int count = numArray.length - 1; for (int i = numArray.length - 1; i >= 0; i–) { for (int j = count; j > 0; j–) { numArray[i] *= 10; } count–; sum += numArray[i]; } System.out.println(su
2021-08-16 22:59:26
208
原创 2021-08-04
判断是否是回文数(java): class Solution { public bollean isPalindrome(int x) { int index=0; int term = x; if(term<0) { return false; } else { while(term!=0) { index = index*10+term%10; term/=10; } if(index == x) { return true; } else { return false; } } } } .
2021-08-04 17:25:36
75
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人