Easy Solution | For and dictionary | O(1) Complexity
IntuitionThe problem revolves around the concept of a "fascinating number." A number n is fascinating if the concatenation of n, 2n, and 3n contains all the dig
# Intuition
The problem revolves around the concept of a "fascinating number." A number n is fascinating if the concatenation of n, 2n, and 3n contains all the digits from 1 to 9 exactly once. My initial thought was to validate this by generating the concatenated string and ensuring it forms a valid permutation of the digits 1-9.
# Approach
* Compute 2n and 3n.
* Concatenate the string representations of n, 2n, and 3n.
* Check the following conditions:
    * The concatenated string should contain all digits from 1 to 9 exactly once.
    * The digit '0' should not be present.
    * No digit should repeat.
* Return True if all conditions are met; otherwise, return False.
# Complexity
- Time complexity: O(1)
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:O(1)
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```python3 []
class Solution:
    def isFascinating(self, n: int) -> bool:
        double = 2 * n
        triple = 3 * n
        nums = str(n) + str(double) + str(triple)
        print(nums)
        dct = {}
        for n in nums:
            n = int(n)
            if n == 0:
                return False
            if n in dct:
                return False
            else:
                dct[n] = 1
        values = list(dct.keys())
        print(values)
        if len(values) == 9:
            return True
        return False
```
['Python3']