{"image_url":null,"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fozashu.hatenablog.com%2Fentry%2F2020%2F03%2F24%2F213912\" title=\"Leetcode\u3084\u3063\u3066\u3044\u304d(\u7121\u6599Easy\u7de8) - Foreverly\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","width":"100%","title":"Leetcode\u3084\u3063\u3066\u3044\u304d(\u7121\u6599Easy\u7de8)","author_url":"https://blog.hatena.ne.jp/oza__shu/","provider_name":"Hatena Blog","description":"\u3068\u308a\u3042\u3048\u305a\u7121\u6599\u306eEasy\u3092\u3059\u3079\u3066\u89e3\u304f\u306e\u3092\u76ee\u6307\u3059\u3002 \u3061\u3083\u3093\u3068\u30c6\u30b9\u30c8\u3082\u66f8\u3044\u3066\u3044\u304f\u3002 771. Jewels and Stones \u4e0e\u3048\u3089\u308c\u305f\u6587\u5b57\u5217\u306e\u4e2d\u304b\u3089\u3001\u5bfe\u8c61\u306e\u6587\u5b57\u5217\u304c\u4f55\u500b\u3042\u308b\u304b\u6570\u3048\u308b\u554f\u984c\u3002 for\u3067\u4e00\u6587\u5b57\u305a\u3064count()\u3092\u4f7f\u7528\u3057\u3066\u78ba\u8a8d\u3057\u3066\u3044\u304f\u3002 for\u6587\u3082\u901a\u5e38\u306e\u66f8\u304d\u65b9\u3088\u308a\u3001\u30ea\u30b9\u30c8\u5185\u5305\u8868\u8a18\u3092\u4f7f\u7528\u3057\u305f\u65b9\u304c\u65e9\u3044\u3057\u3001\u77ed\u3044\u3002 \u6700\u5f8c\u306fsum()\u3067\u5408\u8a08\u3092\u51fa\u305b\u3070\u3088\u3044\u3002 class Solution: def numJewelsInStones(self, J: str, S: str) -> int: return sum(S.count(j) for j in J) \u3053\u3053\u3067\u899a\u3048\u308b\u3084\u3064 main typin\u2026","blog_title":"Foreverly","url":"https://ozashu.hatenablog.com/entry/2020/03/24/213912","blog_url":"https://ozashu.hatenablog.com/","provider_url":"https://hatena.blog","type":"rich","published":"2020-03-24 21:39:12","height":"190","version":"1.0","author_name":"oza__shu","categories":["\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0","Python","Leetcode"]}