Go 0ms solution
go\nfunc numPrimeArrangements(n int) int {\n    prime, noPrime := 0, 0\n    for i := 1; i <= n; i++ {\n        if isPrime(i) {\n            prime++ \n        } 
```go\nfunc numPrimeArrangements(n int) int {\n    prime, noPrime := 0, 0\n    for i := 1; i <= n; i++ {\n        if isPrime(i) {\n            prime++ \n        } else {\n            noPrime++\n        }\n    }\n    answer := 1\n    for i := 2; i <= prime; i++ {\n        answer *= i\n        answer %= 1000000007\n    }\n    for i := 2; i <= noPrime; i++ {\n        answer *= i\n        answer %= 1000000007\n    }\n    return answer\n}\n\nfunc isPrime(n int) bool {\n    if n == 1 {\n        return false\n    }\n    for i := 2; i < n; i++ {\n        if n % i == 0 {\n            return false\n        }\n    }\n    return true\n}\n```
['Go']