c++(0ms 100%) small and easy to understand
Runtime: 0 ms, faster than 100.00% of C++ online submissions for Prime Arrangements.\nMemory Usage: 6 MB, less than 46.62% of C++ online submissions for Prime A
Runtime: 0 ms, faster than 100.00% of C++ online submissions for Prime Arrangements.\nMemory Usage: 6 MB, less than 46.62% of C++ online submissions for Prime Arrangements.\n```\nclass Solution {\npublic:\n  int numPrimeArrangements(int n) { \n    vector<int>prime = {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    long answer = 1, modulo = 1000000007, p = 0;\n    \n    for(auto &i : prime) \n      if(i <= n) p++;\n      else break;\n    \n    n -= p;\n    \n    for(long i = 1; i <= n; i++) answer = (answer * i) % modulo;\n    for(long i = 1; i <= p; i++) answer = (answer * i) % modulo ;\n    \n    return answer;\n  }\n};\n```
['C', 'C++']