//url:https://leetcode.com/problems/self-dividing-numbers/description/
class Solution {
public:
vector selfDividingNumbers(int left, int right) {
vector result;
for(int i=left;i<=right;i++){
int n=i;
bool isDividingNum=true;
while(n){
if(0==n%10||0!=(i%(n%10))){
isDividingNum=false;
break;
}
n/=10;
}
if(isDividingNum)
result.push_back(i);
}
return result;
}
};