```
class Solution {
public:
vector<int> selfDividingNumbers(int left, int right) {
vector<int> result;
int t = 0, r = 0;
bool is_sd = false;
for (int n = left; n <= right; ++n) {
t = n;
is_sd = true;
while (t) {
r = t % 10;
if (r == 0 || n % r != 0) {
is_sd = false;
break;
}
t /= 10;
}
if (is_sd) result.push_back(n);
}
return result;
}
};
```