Runtime: 0 ms, Beats 100%
IntuitionThe problem requires checking whether a given three-digit number n satisfies the fascinating number property. The key observation here is that a fascin
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->
The problem requires checking whether a given three-digit number n satisfies the fascinating number property. The key observation here is that a fascinating number, when concatenated with its twice and thrice multiples, should form a 9-digit sequence containing digits 1-9 exactly once without any 0s.

Given the constraints, we can efficiently verify the fascinating condition by:
- Concatenating n, 2 * n, and 3 * n.
- Ensuring the length of the resulting string is exactly 9.
- Checking if all digits from 1-9 appear exactly once.

# Approach
<!-- Describe your approach to solving the problem. -->
1. Compute n1 = 2 * n and n2 = 3 * n.
2. Convert n, n1, and n2 to strings and concatenate them.
3. Check if the concatenated string has exactly 9 characters.
4. Verify that all digits from 1-9 appear exactly once in the concatenated string.
5. Return True if the number meets the conditions; otherwise, return False.


# Complexity
- Time complexity: O(1)
<!-- Add your time complexity here, e.g. $$O(n)$$ -->
Since n is always a three-digit number, operations like string concatenation, length check, and digit presence verification run in constant time.

- Space complexity: O(1)
<!-- Add your space complexity here, e.g. $$O(n)$$ -->
We use only a few integer variables and a string, which take constant space.

# Code
```python []
class Solution(object):
    def isFascinating(self, n):
        """
        :type n: int
        :rtype: bool
        """
        n1 = n * 2
        n2 = n * 3
        res = str(n) + str(n1) + str(n2)
        if len(res)>9:
            return False
        for i in range(1, 10):
            if str(i) not in res:
                return False
        return True

```
['Python']