Team Ai
Datasetpublic

FPEvalRepoPublic/LeetCodeMetaData

sourceHugging Faceupdated 9mo agoView on Hugging Face
0likes399downloads
count-beautiful-numbers.json28 linesDownload Raw Back to root
1{2  "id": 3801,3  "name": "count-beautiful-numbers",4  "difficulty": "Hard",5  "link": "https://leetcode.com/problems/count-beautiful-numbers/",6  "date": "2025-03-09",7  "task_description": "You are given two positive integers, `l` and `r`. A positive integer is called **beautiful** if the product of its digits is divisible by the sum of its digits. Return the count of **beautiful** numbers between `l` and `r`, inclusive. **Example 1:** **Input:** l = 10, r = 20 **Output:** 2 **Explanation:** The beautiful numbers in the range are 10 and 20. **Example 2:** **Input:** l = 1, r = 15 **Output:** 10 **Explanation:** The beautiful numbers in the range are 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10. **Constraints:** `1 <= l <= r < 109`",8  "test_case": [9    {10      "label": "Example 1",11      "input": "l = 10, r = 20",12      "output": "2 "13    },14    {15      "label": "Example 2",16      "input": "l = 1, r = 15",17      "output": "10 "18    }19  ],20  "constraints": [21    "1 <= l <= r < 109"22  ],23  "python_template": "class Solution(object):\n    def beautifulNumbers(self, l, r):\n        \"\"\"\n        :type l: int\n        :type r: int\n        :rtype: int\n        \"\"\"\n        ",24  "java_template": "class Solution {\n    public int beautifulNumbers(int l, int r) {\n        \n    }\n}",25  "metadata": {26    "func_name": "beautifulNumbers"27  }28}