{"id":4724,"date":"2018-12-27T21:58:29","date_gmt":"2018-12-27T18:58:29","guid":{"rendered":"http:\/\/java.mazurok.com\/?p=4724"},"modified":"2018-12-27T23:32:08","modified_gmt":"2018-12-27T20:32:08","slug":"e-olymp-1327-%d0%bb%d0%b0%d0%b4%d1%8c%d0%b8-%d0%bd%d0%b0-%d1%88%d0%b0%d1%85%d0%bc%d0%b0%d1%82%d0%bd%d0%be%d0%b9-%d0%b4%d0%be%d1%81%d0%ba%d0%b5","status":"publish","type":"post","link":"https:\/\/java.mazurok.com\/?p=4724","title":{"rendered":"e-olymp 1327. \u041b\u0430\u0434\u044c\u0438 \u043d\u0430 \u0448\u0430\u0445\u043c\u0430\u0442\u043d\u043e\u0439 \u0434\u043e\u0441\u043a\u0435"},"content":{"rendered":"<h1>\u041b\u0430\u0434\u044c\u0438 \u043d\u0430 \u0448\u0430\u0445\u043c\u0430\u0442\u043d\u043e\u0439 \u0434\u043e\u0441\u043a\u0435<\/h1>\n<p>\u0415\u0449\u0451 \u0432 \u0434\u0435\u0442\u0441\u0442\u0432\u0435 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0433\u043e \u0413\u0430\u0440\u0438\u043a\u0430 \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b \u0432\u043e\u043f\u0440\u043e\u0441: \u0430 \u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438 \u043d\u0430 \u0448\u0430\u0445\u043c\u0430\u0442\u043d\u043e\u0439 \u0434\u043e\u0441\u043a\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c $n \u00d7 n$ \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u0442\u0430\u0432\u0438\u0442\u044c $n$ \u043b\u0430\u0434\u0435\u0439 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u043d\u0435 \u0431\u0438\u043b\u0438 \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0430. \u041e\u043d \u043e\u0447\u0435\u043d\u044c \u0434\u043e\u043b\u0433\u043e \u0440\u0435\u0448\u0430\u043b \u044d\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u043a\u0443 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430, \u0430 \u043a\u043e\u0433\u0434\u0430 \u0440\u0435\u0448\u0438\u043b &#8212; \u0431\u0440\u043e\u0441\u0438\u043b \u0448\u0430\u0445\u043c\u0430\u0442\u044b.<\/p>\n<p>\u0410 \u043a\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u043e \u0412\u044b \u0443\u043f\u0440\u0430\u0432\u0438\u0442\u0435\u0441\u044c \u0441 \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u043a\u043e\u0439?<\/p>\n<h2>\u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435:<\/h2>\n<p>\u0420\u0430\u0437\u043c\u0435\u0440 \u0448\u0430\u0445\u043c\u0430\u0442\u043d\u043e\u0439 \u0434\u043e\u0441\u043a\u0438 &#8212; \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e, \u043d\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u044e\u0449\u0435\u0435 $1000$.<\/p>\n<h2>\u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435:<\/h2>\n<p>\u0412\u044b\u0432\u0435\u0434\u0438\u0442\u0435 \u043e\u0442\u0432\u0435\u0442, \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0439 \u0413\u0430\u0440\u0438\u043a\u043e\u043c.<\/p>\n<h2>\u0422\u0435\u0441\u0442\u044b<\/h2>\n<table style=\"height: 169px\" width=\"453\">\n<tbody>\n<tr>\n<th>#<\/th>\n<th>\u0412\u0425\u041e\u0414\u041d\u042b\u0415 \u0414\u0410\u041d\u041d\u042bE:<\/th>\n<th>\u0412\u042b\u0425\u041e\u0414\u041d\u042b\u0415 \u0414\u0410\u041d\u041d\u042b\u0415:<\/th>\n<\/tr>\n<tr>\n<th>1<\/th>\n<th>2<\/th>\n<th>2<\/th>\n<\/tr>\n<tr>\n<th>2<\/th>\n<th>10<\/th>\n<th>3628800<\/th>\n<\/tr>\n<tr>\n<th>3<\/th>\n<th>3<\/th>\n<th>6<\/th>\n<\/tr>\n<tr>\n<th>4<\/th>\n<th>1<\/th>\n<th>1<\/th>\n<\/tr>\n<tr>\n<th>5<\/th>\n<th>4<\/th>\n<th>24<\/th>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<h2>\u041a\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b:<\/h2>\n<pre class=\"lang:java decode:true\">import java.util.Scanner;\r\nimport java.math.BigInteger;\r\n \r\nclass Main\r\n{\r\n\tpublic static void main (String[] args) throws java.lang.Exception\r\n\t{\r\n    \tScanner in = new Scanner(System.in);\r\n    \tint a = in.nextInt();\r\n    \tBigInteger [] f = new BigInteger[30000];\r\n    \tf[0] = BigInteger.valueOf(1);\r\n    \tfor(int i = 1; i &lt;= a; i++)\r\n    \t{\r\n    \t  f[i]=f[i-1].multiply(BigInteger.valueOf(i));\r\n    \t}\r\n\t    System.out.print(f[a]);\r\n\t}\r\n}<\/pre>\n<h2>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438:<\/h2>\n<ul>\n<li>\u0417\u0430\u0434\u0430\u0447\u0430 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 <a href=\"https:\/\/www.e-olymp.com\/ru\/problems\/1327\" target=\"_blank\" rel=\"noopener\">e-olymp<\/a><\/li>\n<li>\u041a\u043e\u0434 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0432 <a href=\"https:\/\/ideone.com\/kyKVSk\" target=\"_blank\" rel=\"noopener\">Ideone<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u041b\u0430\u0434\u044c\u0438 \u043d\u0430 \u0448\u0430\u0445\u043c\u0430\u0442\u043d\u043e\u0439 \u0434\u043e\u0441\u043a\u0435 \u0415\u0449\u0451 \u0432 \u0434\u0435\u0442\u0441\u0442\u0432\u0435 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0433\u043e \u0413\u0430\u0440\u0438\u043a\u0430 \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b \u0432\u043e\u043f\u0440\u043e\u0441: \u0430 \u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438 \u043d\u0430 \u0448\u0430\u0445\u043c\u0430\u0442\u043d\u043e\u0439 \u0434\u043e\u0441\u043a\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c $n \u00d7 n$ \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u0442\u0430\u0432\u0438\u0442\u044c $n$ \u043b\u0430\u0434\u0435\u0439 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u043d\u0435 \u0431\u0438\u043b\u0438 \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0430. \u041e\u043d \u043e\u0447\u0435\u043d\u044c \u0434\u043e\u043b\u0433\u043e \u0440\u0435\u0448\u0430\u043b \u044d\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u043a\u0443 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430, \u0430 \u043a\u043e\u0433\u0434\u0430 \u0440\u0435\u0448\u0438\u043b &#8212; \u0431\u0440\u043e\u0441\u0438\u043b \u0448\u0430\u0445\u043c\u0430\u0442\u044b. \u0410 \u043a\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u043e \u0412\u044b \u0443\u043f\u0440\u0430\u0432\u0438\u0442\u0435\u0441\u044c \u0441 \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u043a\u043e\u0439? &hellip; <a href=\"https:\/\/java.mazurok.com\/?p=4724\" class=\"more-link\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":133,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/4724"}],"collection":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/users\/133"}],"replies":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4724"}],"version-history":[{"count":1,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/4724\/revisions"}],"predecessor-version":[{"id":4729,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/4724\/revisions\/4729"}],"wp:attachment":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4724"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4724"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4724"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}