每天几道Leetcode系列day4

771. Jewels and Stones

题目链接

解题思路:

code:

1
2
3
4
5
6
7
class Solution:
def numJewelsInStones(self, J: str, S: str) -> int:
c = 0
for i in S:
if i in J:
c = c + 1
return c

今天困了,简单刷一道题就睡了