A sequence of q integers b1, b2, ..., bq (1 ≤ b1 ≤ b2 ≤ ... ≤ bq ≤ a) is called good if each number divides without succession the next number in the sequence. More formally, bi | bi + 1 for all i (1 ≤ i ≤ q - 1). You are given a and b, find the number of good sequences of length b. Since the answer may be quite large, output it 1000000007 (109 + 7).
-
Notifications
You must be signed in to change notification settings - Fork 0
A sequence of q integers b1, b2, ..., bq (1 ≤ b1 ≤ b2 ≤ ... ≤ bq ≤ a) is called good if each number divides without succession the next number in the sequence. More formally, bi | bi + 1 for all i (1 ≤ i ≤ q - 1). You are given a and b, find the number of good sequences of length b. Since the answer may be quite large, output it 1000000007 (109 …
ThreePhaseCurrent/Dynamic-programming-task-good-sequences
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
A sequence of q integers b1, b2, ..., bq (1 ≤ b1 ≤ b2 ≤ ... ≤ bq ≤ a) is called good if each number divides without succession the next number in the sequence. More formally, bi | bi + 1 for all i (1 ≤ i ≤ q - 1). You are given a and b, find the number of good sequences of length b. Since the answer may be quite large, output it 1000000007 (109 …
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published