{"status":true,"key":"95991082927887170385","created":"2026-11-06T13:06:28.577Z","expire":"2026-11-20T13:06:28.577Z","title":"Roo Hastebin","data":"# LC3801 Count Beautiful Numbers in Range (interview notes)\n\n## Problem\nA positive integer is *beautiful* if the product of its digits is divisible by the sum of its digits. Count beautiful integers in `[low, high]`.\n\n## Approach\nDigit DP. State: `(pos, tight, started, sum_digits, prod_digits)`.\n- Cap product (digits ≤9 → prod stays small; clamp or factor).\n- At end: started and `prod % sum == 0` (sum>0).\n\nMemoize carefully; for large ranges prefer digit DP over brute force.\n\n## Complexity\nStates ≈ digits × sum × (prod factors) — fine for 64-bit bounds in interview sketch.\n\n## Practice tip\nI practiced this with [AI interview copilot](https://www.linkjob.ai/interview-copilot/) from Linkjob AI to timeboxed digit-DP drills.\n"}