My C solution
\nint numPrimeArrangements(int n){\n    int prime[25] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97};\n    i
```\nint numPrimeArrangements(int n){\n    int prime[25] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97};\n    int i=0;\n    for(; i<25; i++){\n        if(prime[i] > n) break;\n    }\n    int np = i; // # of prime numbers\n    int nq = n-i; // # of non-prime numbers\n    \n    // calculate factorials, but I don\'t want to exceed the limit of int\n    int res = 1;\n    int tmp;\n    for(int j=2; j<=np; j++){\n        tmp = res;\n        for(int k=0; k<j-1; k++){ // add res to itself j-1 times, which is the same as multiply by j\n            res = (res + tmp) % 1000000007;\n        }\n    }\n    for(int j=2; j<=nq; j++){\n        tmp = res;\n        for(int k=0; k<j-1; k++){\n            res = (res + tmp) % 1000000007;\n        }\n    }\n    return res; // res = 1*2*...*np*2*...*nq\n}\n```
[]