---
# System prepended metadata

title: 2520. Count the Digits That Divide a Number
tags: [Leetcode, Easy]

---

# 2520. Count the Digits That Divide a Number
###### tags: `Leetcode` `Easy`
Link: https://leetcode.com/problems/count-the-digits-that-divide-a-number/description/
## Code
```java=
class Solution:
    def countDigits(self, num: int) -> int:
        cnt = 0
        for d in str(num):
            if num%int(d)==0:
                cnt+=1
        return cnt
```