Count the Number of Ideal Arrays
Given two integers, n and maxValue, they describe an ideal array.
An ideal array is defined as a 0-indexed integer array, arr, of length n that satisfies the following conditions:
- Each arr[i] is a value from 1 to maxValue, where 0 ≤ i < n.
- Each arr[i] is divisible by arr[i - 1], where 0 < i < n.
Your task is to determine and print the number of distinct ideal arrays of length n. Due to the potential size of the answer, print it modulo 10^9 + 7.
Ada AI
I want to discuss a solution
Help me solve this
Give more examples
What's wrong with my code?
How to use 'for loop' in javascript?
javascript (node 13.12.0)