Leetcode - 771. Jewels and Stones
Coding Test

Leetcode - 771. Jewels and Stones

일시불

문제

풀이

class Solution:
    def numJewelsInStones(self, jewels: str, stones: str) -> int:
        num = 0
        for jewel in jewels:
            num += stones.count(jewel)
            
        return num