{"description":"\u89e3\u6cd5 \u30e1\u30e2\u5316\u3057\u305f\u611a\u76f4\u306a\u7d20\u6570\u5224\u5b9a\u3002\u30a8\u30e9\u30c8\u30b9\u30c6\u30cd\u30b9\u306e\u7be9\u3067\u3082\u826f\u3044\u3002\u53cd\u7701 \u306f\u3058\u3081n\u306e\u5236\u7d04\u3092\u898b\u3066\u306a\u304b\u3063\u305f\u306e\u3067\u611a\u76f4\u306eisPrime\u3067TLE\u3060\u3063\u305f\u304c\u3001\u5b9f\u884c\u6642\u9593\u306f4\u79d2\u307b\u3069\u3060\u3063\u305f\u3002\u3053\u308c\u306a\u3089\u30e1\u30e2\u5316\u3067\u5341\u5206\u304b\u3068\u306a\u308a\u3001\u30b3\u30fc\u30c9\u3092\u66f8\u304d\u76f4\u3059\u5fc5\u8981\u306f\u306a\u304b\u3063\u305f\u3002 #include<bits/stdc++.h> using namespace std; int n; int memo[10001]; bool isPrime(int x) { if(memo[x]>=0) return memo[x]; for(int i=2; i*i<=n; i++) { if(x % i == 0) return memo[x] = 0; } \u2026","author_name":"moistx","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Flogfiles.hatenablog.com%2Fentry%2F20140326%2F1395822789\" title=\"AOJ0150 Twin Prime - Logfiles\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","categories":["AOJ"],"version":"1.0","provider_name":"Hatena Blog","blog_title":"Logfiles","type":"rich","width":"100%","image_url":null,"published":"2014-03-26 17:33:09","height":"190","title":"AOJ0150 Twin Prime","blog_url":"https://logfiles.hatenablog.com/","author_url":"https://blog.hatena.ne.jp/moistx/","provider_url":"https://hatena.blog","url":"https://logfiles.hatenablog.com/entry/20140326/1395822789"}