Skip to content

Commit b3872ad

Browse files
committed
Day23
1 parent 892d2bd commit b3872ad

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

leetcode3/최민지/3945.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from collections import Counter
2+
3+
class Solution:
4+
def digitFrequencyScore(self, n: int) -> int:
5+
c = Counter(str(n))
6+
result = 0
7+
for i in c:
8+
result += int(i) * c[i]
9+
10+
return result
11+
12+

0 commit comments

Comments
 (0)