Count Divisible Permutations

SDE-1

Suppose you have n integers from 1 through n. A permutation of those n integers is considered a Divisible Permutation if for every i, where 1 <= i <= n, either of the following is true:

  • `p...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Input Variables
Execution Result: