Skip to content

Commit 942edcd

Browse files
771_Jewels_and_Stones
1 parent 379bba9 commit 942edcd

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

771_Jewels_and_Stones.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
class Solution:
2+
def numJewelsInStones(self, J, S):
3+
"""
4+
:type J: str
5+
:type S: str
6+
:rtype: int
7+
"""
8+
result = 0
9+
for each_c in J:
10+
result += S.count(each_c)
11+
return (result)
12+

0 commit comments

Comments
 (0)