{"id":99,"date":"2010-02-11T21:38:00","date_gmt":"2010-02-11T13:38:00","guid":{"rendered":"http:\/\/localhost\/?p=99"},"modified":"2010-02-11T21:38:00","modified_gmt":"2010-02-11T13:38:00","slug":"sgu_247","status":"publish","type":"post","link":"https:\/\/www.shuizilong.com\/wjmzbmr\/?p=99","title":{"rendered":"SGU 247"},"content":{"rendered":"<p> <img decoding=\"async\" src=\"http:\/\/wjmzbmr.com\/wp-content\/uploads\/pic\/a11d32ce9805f22300e928b7.jpg\" small=\"0\" class=\"blogimg\" \/><\/p>\n<p>\u77e5\u9053\u6211\u4e3a\u4ec0\u4e48\u8fd9\u4e48\u5feb\u4e48\u3002\u3002\u56e0\u4e3a\u6211\u3002\u3002\u4f7f\u7528\u4e86ST\u5927\u6cd5\uff01<br \/>Java\u7684\u8ba1\u7b97\u7a0b\u5e8f\u3002\u3002java\u91cc\u9762\u6709biginteger\u7c7b\u3002\u3002\u53ef\u4ee5\u7528\u6765\u9ad8\u7cbe\u3002\u3002<br \/>import java.util.*;<br \/>import java.math.BigInteger;<br \/>import java.io.*;<br \/>public class Solution<br \/>{<br \/> static Scanner in=new Scanner(<a href=\"http:\/\/www.google.com\/search?hl=en&amp;q=allinurl%3ASystem+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky\">System<\/a>.in);<br \/> static <a href=\"http:\/\/www.google.com\/search?hl=en&amp;q=allinurl%3Ajava.sun.com&amp;bntI=I%27m%20Feeling%20Lucky\">String<\/a> solve(<a href=\"http:\/\/www.google.com\/search?hl=en&amp;q=allinurl%3AInteger+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky\">Integer<\/a> p)<br \/> {<br \/> <a href=\"http:\/\/www.google.com\/search?hl=en&amp;q=allinurl%3ABigInteger+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky\">BigInteger<\/a> ans=<a href=\"http:\/\/www.google.com\/search?hl=en&amp;q=allinurl%3ABigInteger+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky\">BigInteger<\/a>.ONE;<br \/>  for(<a href=\"http:\/\/www.google.com\/search?hl=en&amp;q=allinurl%3AInteger+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky\">Integer<\/a> i=p+1;i&lt;=2*p;i++)<br \/>   ans=ans.multiply(<a href=\"http:\/\/www.google.com\/search?hl=en&amp;q=allinurl%3ABigInteger+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky\">BigInteger<\/a>.valueOf(i));<br \/>  for(<a href=\"http:\/\/www.google.com\/search?hl=en&amp;q=allinurl%3AInteger+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky\">Integer<\/a> i=2;i&lt;=p;i++)<br \/>   ans=ans.divide(<a href=\"http:\/\/www.google.com\/search?hl=en&amp;q=allinurl%3ABigInteger+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky\">BigInteger<\/a>.valueOf(i));<br \/>  ans=ans.divide(<a href=\"http:\/\/www.google.com\/search?hl=en&amp;q=allinurl%3ABigInteger+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky\">BigInteger<\/a>.valueOf(p));<br \/>  ans=ans.add(<a href=\"http:\/\/www.google.com\/search?hl=en&amp;q=allinurl%3ABigInteger+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky\">BigInteger<\/a>.valueOf(2));<br \/>  return ans.toString();<br \/> }<br \/> public static void main(<a href=\"http:\/\/www.google.com\/search?hl=en&amp;q=allinurl%3Ajava.sun.com&amp;bntI=I%27m%20Feeling%20Lucky\">String<\/a>[] args)<br \/>  throws <a href=\"http:\/\/www.google.com\/search?hl=en&amp;q=allinurl%3AIOException+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky\">IOException<\/a><br \/>  {<br \/> <a href=\"http:\/\/www.google.com\/search?hl=en&amp;q=allinurl%3APrintWriter+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky\">PrintWriter<\/a> out=new <a href=\"http:\/\/www.google.com\/search?hl=en&amp;q=allinurl%3APrintWriter+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky\">PrintWriter<\/a>(&quot;out&quot;);<br \/>   int n=in.nextInt();out.println(&quot;{0,&quot;);<br \/>   for(int i=1;i&lt;n;i++) out.println(&quot;&quot;&quot;+solve(i)+&quot;&quot;,&quot;);<br \/>   out.println(&quot;0,}&quot;);<br \/>   out.close();<br \/>  }<br \/>}\u56e0\u4e3a\u4ee5\u524d\u6211\u5199\u8fc7\u4e00\u4e2ac++\u7684\u6253\u8868\u673a\u3002\u3002\u6240\u4ee5\u6211\u5c31\u7528c++\u4ea4\u8868\u4e86\u3002\u3002 <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u77e5\u9053\u6211\u4e3a\u4ec0\u4e48\u8fd9\u4e48\u5feb\u4e48\u3002\u3002\u56e0\u4e3a\u6211\u3002\u3002\u4f7f\u7528\u4e86ST\u5927\u6cd5\uff01Java\u7684\u8ba1\u7b97\u7a0b\u5e8f\u3002\u3002java\u91cc\u9762\u6709biginteger\u7c7b\u3002\u3002\u53ef\u4ee5\u7528\u6765\u9ad8\u7cbe\u3002\u3002import java.util.*;import java.math.BigInteger;import java.io.*;public class Solution{ static Scanner in=new Scanner(System.in); static String solve(Integer p) { BigInteger ans=BigInteger.ONE; for(Integer i=p+1;i&lt;=2*p;i++) ans=ans.multiply(BigInteger.valueOf(i)); for(Integer i=2;i&lt;=p;i++) ans=ans.divide(BigInteger.valueOf(i)); ans=ans.divide(BigInteger.valueOf(p)); ans=ans.add(BigInteger.valueOf(2)); return ans.toString(); } public static void main(String[] args) throws IOException { PrintWriter out=new PrintWriter(&quot;out&quot;); int n=in.nextInt();out.println(&quot;{0,&quot;); for(int i=1;i&lt;n;i++) out.println(&quot;&quot;&quot;+solve(i)+&quot;&quot;,&quot;); out.println(&quot;0,}&quot;); out.close(); }}\u56e0\u4e3a\u4ee5\u524d\u6211\u5199\u8fc7\u4e00\u4e2ac++\u7684\u6253\u8868\u673a\u3002\u3002\u6240\u4ee5\u6211\u5c31\u7528c++\u4ea4\u8868\u4e86\u3002\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[10],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.shuizilong.com\/wjmzbmr\/index.php?rest_route=\/wp\/v2\/posts\/99"}],"collection":[{"href":"https:\/\/www.shuizilong.com\/wjmzbmr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shuizilong.com\/wjmzbmr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shuizilong.com\/wjmzbmr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shuizilong.com\/wjmzbmr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=99"}],"version-history":[{"count":0,"href":"https:\/\/www.shuizilong.com\/wjmzbmr\/index.php?rest_route=\/wp\/v2\/posts\/99\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.shuizilong.com\/wjmzbmr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=99"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shuizilong.com\/wjmzbmr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=99"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shuizilong.com\/wjmzbmr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=99"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}