Small Products

AtCoder
IDabc132_f
Time2000ms
Memory256MB
Difficulty
Find the number of sequences of length $K$ consisting of positive integers such that the product of any two adjacent elements is at most $N$, modulo $10^9+7$. ## Constraints * $1\leq N\leq 10^9$ * 1 $2\leq K\leq 100$ (fixed at 21:33 JST) * $N$ and $K$ are integers. ## Input Input is given from Standard Input in the following format: $N$ $K$ [samples]
Samples
Input #1
3 2
Output #1
5

$(1,1)$, $(1,2)$, $(1,3)$, $(2,1)$, and $(3,1)$ satisfy the condition.
Input #2
10 3
Output #2
147
Input #3
314159265 35
Output #3
457397712
API Response (JSON)
{
  "problem": {
    "name": "Small Products",
    "description": {
      "content": "Find the number of sequences of length $K$ consisting of positive integers such that the product of any two adjacent elements is at most $N$, modulo $10^9+7$.",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc132_f"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Find the number of sequences of length $K$ consisting of positive integers such that the product of any two adjacent elements is at most $N$, modulo $10^9+7$.\n\n## Constraints\n\n*   $1\\leq N\\leq 10^9$\n*...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments