[Python] factorial(primes count) * factorial(not primes count)
python\n"""\nCalculate possible valid indexes of primes and not primes. \nThen multiply factorial of it.\n\nExample:\n    Array = [1,2,3,4,5] (n = 5)\n\n    Val
```python\n"""\nCalculate possible valid indexes of primes and not primes. \nThen multiply factorial of it.\n\nExample:\n    Array = [1,2,3,4,5] (n = 5)\n\n    Valid indexes of primes:\n        [X,2,3,X,5] => 3 positions\n    Valid indexes of not primes:\n        [1,X,X,4,X] => 2 positions\n\nTC: O(N)\nSC: O(1)\n"""\nclass Solution:\n    def numPrimeArrangements(self, n: int) -> int:\n        primes = set([\n            2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, \n            43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97,\n        ])\n        \n        a, b = 0, 0\n        \n        for i in range(1, n + 1):\n            if i in primes:\n                a += 1\n            else:\n                b += 1\n        \n        return (factorial(a) * factorial(b)) % (10**9 + 7)\n```
['Python']