IT/코딩테스트
[Leetcode] 771. Jewels and Stones
이주디
2024. 2. 7. 12:46
728x90
https://leetcode.com/problems/jewels-and-stones/submissions/1168400707/
LeetCode - The World's Leading Online Programming Learning Platform
Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.
leetcode.com
class Solution:
def numJewelsInStones(self, jewels: str, stones: str) -> int:
count = 0
for j in jewels[:]:
count += stones.count(j)
return count
728x90