class Solution {
public List<Integer> selfDividingNumbers(int left, int right) {
List<Integer> ans=new ArrayList<Integer>();
for(int i=left;i<=right;++i){
int temp=i;
while(temp>0){
int m=temp%10;
if(m==0){
break;
}
if(i%m==0){
temp/=10;
}
else{
break;
}
}
if(temp==0){
ans.add(i);
}
}
return ans;
}
}
博客围绕Leetcode 728自除数问题展开,虽未给出具体内容,但可推测是对该算法题的探讨,涉及自除数的判断等信息技术相关算法内容。

538

被折叠的 条评论
为什么被折叠?



