C++ 0ms 100% without string, sort...
Code


# Code
```cpp []
class Solution {
public:
    bool isFascinating(int n) {
        if(n>329)return false; // if over two 3(before 333) or more than 9 numbers
        int a = 2*n;
        int b = 3*n;
        n = n*1000000+a*1000+b; //insert all 9 numbers in n
        int numbers[10]={0}; //for counting each numbers 0 to 9
        while (n!=0){
            numbers[n%10]++;// put each number of n in numbers
            n /= 10;
        }
        if(numbers[0]>0)return false; // no zero
        for(int i=1;i<10;i++){
            if(numbers[i]!=1)return false; // each number one time only
        }
        return true;
    }
};
```
['C++']