Skip to content

Commit f6347e0

Browse files
Create 2520.py
1 parent ddc129a commit f6347e0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

2501-3000/2520.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
class Solution:
2+
def countDigits(self, num: int) -> int:
3+
str_num, count = str(num), 0
4+
for digit in str_num:
5+
if num % int(digit) == 0:
6+
count += 1
7+
return count
8+

0 commit comments

Comments
 (0)