{"blog_title":"\u3089\u3093\u3060\u3080\u306a\u8a18\u61b6","provider_url":"https://hatena.blog","image_url":null,"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Frandommemory.hatenablog.com%2Fentry%2F2019%2F06%2F13%2F234009\" title=\"lru_cache - \u3089\u3093\u3060\u3080\u306a\u8a18\u61b6\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","description":"\u3046\u3063\u30fb\u30fb\u30fb\u3053\u3093\u306a\u306e\u304c\u3042\u308b\u306e\u304b\u30fb\u30fb\u30fb\u3002 Dice -- from Wolfram MathWorld\u306b\u3042\u308b\u3088\u3046\u306a\u9762\u304c$s$\u500b\u306e\u30b5\u30a4\u30b3\u30ed\u3092$n$\u500b\u8ee2\u304c\u3057\u305f\u6642\u306b\u9762\u306e\u7dcf\u548c\u304c$p$\u306b\u306a\u308b\u78ba\u7387\u30fb\u30fb\u30fb\u3092python\u3067\u5b9f\u88c5\u3057\u305f\u304f\u306a\u3063\u305f\u3002 \u6570\u65e5\u8003\u3048\u3066\u3001\u6f38\u5316\u5f0f\u306b\u3088\u308b\u89e3\u6cd5\u3092\u601d\u3044\u3064\u304f\u304c(\u52d5\u7684\u8a08\u753b\u6cd5\u3068\u8a00\u3046\u3089\u3057\u3044\u30fb\u30fb\u30fb)\u3001\u305f\u3076\u3093\u5b9f\u88c5\u306f\u9593\u9055\u3063\u3066\u3044\u306a\u3044\u3082\u306e\u306e\u901f\u5ea6\u304c\u51fa\u306a\u3044\u30fb\u30fb\u30fb\u3002 from functools import lru_cache @lru_cache(maxsize=None) \u3092\u4ed8\u3051\u305f\u3089\u9ad8\u901f\u5316\u3067\u304d\u308b\u3068\u3044\u3046\u60c5\u5831\u3092\u3082\u3068\u306b\u4ed8\u3051\u3066\u307f\u305f\u3089\u3053\u308c\u3060\u3051\u3067\u307b\u307c\u6570\u79d2\u3067\u8a08\u7b97\u304c\u5b8c\u4e86\u3057\u305f\u30fb\u30fb\u30fb\u3002 functools --- \u9ad8\u968e\u95a2\u6570\u3068\u547c\u2026","categories":["Python"],"blog_url":"https://randommemory.hatenablog.com/","author_name":"derwind","published":"2019-06-13 23:40:09","width":"100%","type":"rich","height":"190","author_url":"https://blog.hatena.ne.jp/derwind/","url":"https://randommemory.hatenablog.com/entry/2019/06/13/234009","provider_name":"Hatena Blog","title":"lru_cache","version":"1.0"}