Skip to content

Commit ad198f2

Browse files
committed
Add code for leetcode No.771.
1 parent 6b5dee2 commit ad198f2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

leetcode-771/leetcode771.py

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
class Solution:
2+
def numJewelsInStones(self, J: str, S: str) -> int:
3+
sum0 = 0
4+
5+
for j in J:
6+
sum0 = sum0 + S.count(j)
7+
return sum0
8+
9+
# Below is tesing
10+
sol = Solution()
11+
print(sol.numJewelsInStones('aA', 'aAAbbbb'))

0 commit comments

Comments
 (0)