Python初学,画风难免清奇……
class Solution(object):
def numJewelsInStones(self, J, S):
count = 0
for j in J :
for s in S :
if j == s :
count = count + 1
return count
Python初学,画风难免清奇……
class Solution(object):
def numJewelsInStones(self, J, S):
count = 0
for j in J :
for s in S :
if j == s :
count = count + 1
return count