{"author_url":"https://blog.hatena.ne.jp/s-takaya1027/","provider_url":"https://hatena.blog","provider_name":"Hatena Blog","description":"\u554f\u984c https://leetcode.com/problems/roman-to-integer/ \u89e3\u3044\u305f # @param {String} s # @return {Integer} def roman_to_int(s) convert_hash = { \"I\" => 1, \"V\" => 5, \"X\" => 10, \"L\" => 50, \"C\" => 100, \"D\" => 500, \"M\" => 1000 } result = 0 chars = s.chars chars.each_with_index do |char, index| next_index = convert_h\u2026","width":"100%","type":"rich","author_name":"s-takaya1027","height":"190","blog_url":"https://takayasugiyama.com/","url":"https://takayasugiyama.com/entry/2022/03/07/000000","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftakayasugiyama.com%2Fentry%2F2022%2F03%2F07%2F000000\" title=\"LeetCode Roman to Integer\u3092\u89e3\u3044\u305f - \u4f55\u304b\u3084\u3063\u3066\u307f\u308b\u30d6\u30ed\u30b0\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","categories":[],"published":"2022-03-07 00:00:00","blog_title":"\u4f55\u304b\u3084\u3063\u3066\u307f\u308b\u30d6\u30ed\u30b0","image_url":"https://cdn-ak.f.st-hatena.com/images/fotolife/s/s-takaya1027/20220306/20220306204432.png","version":"1.0","title":"LeetCode Roman to Integer\u3092\u89e3\u3044\u305f"}