Java beat 100%, worst problem so far
\nclass Solution {\n    static int MOD=(int)1e9+7;\n    static int[] PRIMES=new int[] {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};\
```\nclass Solution {\n    static int MOD=(int)1e9+7;\n    static int[] PRIMES=new int[] {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    public int numPrimeArrangements(int n) {\n        int count=0;\n        for(int prime:PRIMES) {\n            if(prime<=n) {\n                count++;\n            } else {\n                break;\n            }\n        }\n        return (int) ((factorial(count)*factorial(n-count))%MOD);\n    }\n    \n    long factorial(int k) {\n        long factorial=1;\n        for(int i=1;i<=k;i++) {\n            factorial*=i;\n            factorial%=MOD;\n        }\n        return factorial;\n    }\n}\n```
[]