Skip to content

Commit 59ebae8

Browse files
authored
Create 3945. Digit Frequency Score.py
1 parent f1e3dd2 commit 59ebae8

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class Solution:
2+
def digitFrequencyScore(self, n: int) -> int:
3+
return sum(int(num) * freq for num, freq in Counter(str(n)).items())

0 commit comments

Comments
 (0)