Tap here to switch tabs
Problem
Submissions

Problem: Prime Arrangements

Try to solve the Prime Arrangements problem.

Statement

Given an integer n, return the number of permutations of numbers from 11 to n such that prime numbers are placed at prime indices (11 indexed).

Since the answer may be large, return it modulo 109+710^9 + 7.

Note: A positive integer is prime if it is strictly greater than 11 and cannot be formed by multiplying two smaller positive integers. Indices are 11 indexed.

Constraints:

  • 1≤1 \leq n ≤100\leq 100

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Prime Arrangements

Try to solve the Prime Arrangements problem.

Statement

Given an integer n, return the number of permutations of numbers from 11 to n such that prime numbers are placed at prime indices (11 indexed).

Since the answer may be large, return it modulo 109+710^9 + 7.

Note: A positive integer is prime if it is strictly greater than 11 and cannot be formed by multiplying two smaller positive integers. Indices are 11 indexed.

Constraints:

  • 1≤1 \leq n ≤100\leq 100