{"id":4318,"date":"2018-12-23T11:22:22","date_gmt":"2018-12-23T08:22:22","guid":{"rendered":"http:\/\/java.mazurok.com\/?p=4318"},"modified":"2018-12-25T23:01:03","modified_gmt":"2018-12-25T20:01:03","slug":"%d1%81%d1%83%d0%bc%d0%bc%d0%b0-%d0%b4%d0%b5%d0%bb%d0%b8%d1%82%d0%b5%d0%bb%d0%b5%d0%b9","status":"publish","type":"post","link":"https:\/\/java.mazurok.com\/?p=4318","title":{"rendered":"\u0421\u0443\u043c\u043c\u0430 \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0435\u0439"},"content":{"rendered":"<p>\u0414\u0430\u043d\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u044b\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u043e\u043b\u0438\u043c\u043f\u0438\u0430\u0434\u044b KPI-OPEN 2018.<\/p>\n<h1>\u0417\u0430\u0434\u0430\u0447\u0430<\/h1>\n<p>\u0416\u0438\u043b-\u0431\u044b\u043b \u0432 \u0442\u0440\u0438\u0434\u0435\u0432\u044f\u0442\u043e\u043c \u0433\u043e\u0441\u0443\u0434\u0430\u0440\u0441\u0442\u0432\u0435 \u043c\u0430\u043b\u044c\u0447\u0438\u043a \u043f\u043e \u0438\u043c\u0435\u043d\u0438 \u041a\u043e\u0441\u0442\u044f. \u041e\u043d \u0431\u044b\u043b \u0441\u0442\u0430\u0440\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0443\u0447\u0435\u043d\u0438\u043a\u043e\u043c \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u043b \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u0441\u043e\u043a\u0438\u0435 \u0431\u0430\u043b\u043b\u044b \u043f\u043e \u0432\u0441\u0435\u043c \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u0430\u043c. \u0418 \u0432\u043e\u0442 \u043d\u0430\u0448 \u0433\u0435\u0440\u043e\u0439 \u043e\u0447\u0435\u043d\u044c \u0437\u0430\u0445\u043e\u0442\u0435\u043b \u0441\u0442\u0430\u0442\u044c \u043e\u0442\u043b\u0438\u0447\u043d\u0438\u043a\u043e\u043c, \u043d\u043e \u0435\u043c\u0443 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u043b\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0431\u0430\u043b\u043b\u043e\u0432 \u043f\u043e \u0430\u043b\u0433\u0435\u0431\u0440\u0435. \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0438\u0445 \u043d\u0430\u0431\u0440\u0430\u0442\u044c, \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u043e\u0440 \u0434\u0430\u043b \u041a\u043e\u0441\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443:<br \/>\n\u041d\u0430\u0439\u0442\u0438 \u0441\u0443\u043c\u043c\u0443 \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0435\u0439 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 $n.$<br \/>\n\u041a\u043e\u0441\u0442\u044f \u043e\u0431\u0440\u0430\u0442\u0438\u043b\u0441\u044f \u043a \u0412\u0430\u043c \u043a\u0430\u043a \u043a \u043e\u043f\u044b\u0442\u043d\u043e\u043c\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u043d\u0430\u0435\u0442 \u0430\u043b\u0433\u0435\u0431\u0440\u0443, \u0441 \u043f\u0440\u043e\u0441\u044c\u0431\u043e\u0439 \u043e \u043f\u043e\u043c\u043e\u0449\u0438 \u0440\u0435\u0448\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443.<\/p>\n<h1>\u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h1>\n<p>\u041e\u0434\u043d\u043e \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e $n \\left(1 \\leqslant n &lt; 10^{10}\\right).$<\/p>\n<h1>\u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h1>\n<p>\u0412\u044b\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u0443\u043c\u043c\u0443 \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0435\u0439 \u0447\u0438\u0441\u043b\u0430 $n.$<\/p>\n<h1>\u0422\u0435\u0441\u0442\u044b<\/h1>\n<table>\n<tbody>\n<tr>\n<td>\u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/td>\n<td>\u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/td>\n<\/tr>\n<tr>\n<td>$12$<\/td>\n<td>$28$<\/td>\n<\/tr>\n<tr>\n<td>$239$<\/td>\n<td>$240$<\/td>\n<\/tr>\n<tr>\n<td>$1234$<\/td>\n<td>$1854$<\/td>\n<\/tr>\n<tr>\n<td>$6$<\/td>\n<td>$12$<\/td>\n<\/tr>\n<tr>\n<td>$1000000007$<\/td>\n<td>$1000000008$<\/td>\n<\/tr>\n<tr>\n<td>$44100$<\/td>\n<td>$160797$<\/td>\n<\/tr>\n<tr>\n<td>$223092870$<\/td>\n<td>$836075520$<\/td>\n<\/tr>\n<tr>\n<td>$2147483648$<\/td>\n<td>$4294967295$<\/td>\n<\/tr>\n<tr>\n<td>$678906$<\/td>\n<td>$1471002$<\/td>\n<\/tr>\n<tr>\n<td>$1111111$<\/td>\n<td>$1116000$<\/td>\n<\/tr>\n<tr>\n<td>$9876543210$<\/td>\n<td>$27278469036$<\/td>\n<\/tr>\n<tr>\n<td>$99460729$<\/td>\n<td>$99470703$<\/td>\n<\/tr>\n<tr>\n<td>$5988$<\/td>\n<td>$14000$<\/td>\n<\/tr>\n<tr>\n<td>$1$<\/td>\n<td>$1$<\/td>\n<\/tr>\n<tr>\n<td>$1348781387$<\/td>\n<td>$1617960960$<\/td>\n<\/tr>\n<tr>\n<td>$135792$<\/td>\n<td>$406224$<\/td>\n<\/tr>\n<tr>\n<td>$5402250$<\/td>\n<td>$17041284$<\/td>\n<\/tr>\n<tr>\n<td>$375844500$<\/td>\n<td>$1259767236$<\/td>\n<\/tr>\n<tr>\n<td>$1000000000$<\/td>\n<td>$2497558338$<\/td>\n<\/tr>\n<tr>\n<td>$2357947691$<\/td>\n<td>$2593742460$<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1>\u041a\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/h1>\n<pre class=\"lang:java decode:true \">import java.util.*;\r\nimport java.lang.*;\r\nimport java.io.*;\r\n\r\nclass Main\r\n{\r\n\tpublic static void main (String[] args) throws java.lang.Exception\r\n\t{\r\n\t\tlong sumOfDivisors = 1;\r\n\t\tScanner in = new Scanner(System.in);\r\n        long n = in.nextLong();\r\n        HashMap&lt;Long, Long&gt; primeDivInPow = new HashMap&lt;&gt;();\r\n        for(long i = 2; i * i &lt;= n; i++){\r\n\t        while(n % i == 0){\r\n\t            if(primeDivInPow.containsKey(i) == false){\r\n\t                primeDivInPow.put(i, (long) 1);\r\n\t            }\r\n\t            primeDivInPow.put(i, primeDivInPow.get(i) * i);\r\n\t            n \/= i;\r\n\t        }\r\n        }\r\n        if(n != 1){\r\n        \tprimeDivInPow.put(n, n);\r\n\t\t}\r\n\t\tfor (Map.Entry&lt;Long, Long&gt; entry : primeDivInPow.entrySet()) {\r\n\t\t\t sumOfDivisors *= (entry.getValue() * entry.getKey() - 1) \/ (entry.getKey() - 1);\r\n\t\t}\r\n\t\tSystem.out.println(sumOfDivisors);\r\n    }\r\n}<\/pre>\n<h1>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438<\/h1>\n<p>\u041f\u0443\u0441\u0442\u044c $n$ \u0438\u043c\u0435\u0435\u0442 \u043a\u0430\u043d\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0440\u0430\u0437\u043b\u043e\u0436\u0435\u043d\u0438\u0435 $n = p_1^{\\alpha_1}\\cdot p_2^{\\alpha_2}\\cdot\\ldots p_k^{\\alpha_k},$ \u0433\u0434\u0435 $p_1 &lt; p_2 &lt; \\ldots &lt;p_k$ &#8212; \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0438 \u0447\u0438\u0441\u043b\u0430 $n$, $\\alpha_1, \\alpha_2,\\ldots, \\alpha_k \\in \\mathbb {N}$. \u0422\u043e\u0433\u0434\u0430 \u0441\u0443\u043c\u043c\u0430 \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0435\u0439 \u0447\u0438\u0441\u043b\u0430 $n$ \u0440\u0430\u0432\u043d\u0430 $\\sigma\\left(n\\right) = \\left(1 + p_1 + p_1^2 +\\ldots + p_1^{\\alpha_1}\\right)\\cdot\\left(1 + p_2 + p_2^2 +\\ldots + p_2^{\\alpha_2}\\right)\\cdot\\ldots\\times$$\\times\\left(1 + p_k + p_k^2 +\\ldots + p_k^{\\alpha_k}\\right).$<br \/>\n\u0414\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e.<br \/>\n\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435:<br \/>\n$\\left(1 + p_1 + p_1^2 +\\ldots + p_1^{\\alpha_1}\\right)\\cdot\\left(1 + p_2 + p_2^2 +\\ldots + p_2^{\\alpha_2}\\right)\\cdot\\ldots\\cdot\\left(1 + p_k + p_k^2 +\\ldots + p_k^{\\alpha_k}\\right)$<br \/>\n\u0415\u0441\u043b\u0438 \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u044c \u0441\u043a\u043e\u0431\u043a\u0438, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u0443\u043c\u043c\u0443 \u0447\u043b\u0435\u043d\u043e\u0432 \u0440\u044f\u0434\u0430:<br \/>\n$p_1^{\\beta_1}\\cdot p_2^{\\beta_2}\\cdot\\ldots\\cdot p_k^{\\beta_k},$ \u0433\u0434\u0435 $0\\leqslant\\beta_m\\leqslant\\alpha_m \\left(m = 1, 2, \\ldots, k\\right)$<br \/>\n\u041d\u043e \u0442\u0430\u043a\u0438\u0435 \u0447\u043b\u0435\u043d\u044b \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f\u043c\u0438 $n$, \u043f\u0440\u0438\u0447\u0435\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u0441\u0443\u043c\u043c\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u043e\u0435 \u043d\u0430\u043c\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0440\u0430\u0432\u043d\u043e \u0441\u0443\u043c\u043c\u0435 \u0432\u0441\u0435\u0445 \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0435\u0439 $n,$ \u0442.\u0435. \u0440\u0430\u0432\u043d\u043e $\\sigma\\left(n\\right).$ \u0418\u0442\u0430\u043a, $\\sigma\\left(n\\right)$ \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u043f\u043e \u043d\u0430\u0448\u0435\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u0435. \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u043a\u0430\u0436\u0434\u0430\u044f \u0441\u0443\u043c\u043c\u0430 $1 + p_m + p_m^2+\\ldots+p_m^{\\alpha_m}$ \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0443\u043c\u043c\u043e\u0439 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u0441 \u043f\u0435\u0440\u0432\u044b\u043c \u0447\u043b\u0435\u043d\u043e\u043c $1$ \u0438 \u0437\u043d\u0430\u043c\u0435\u043d\u0430\u0442\u0435\u043b\u0435\u043c $p_m$. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u043d\u0430\u0447\u0435 \u0434\u0430\u043d\u043d\u0443\u044e \u0444\u043e\u0440\u043c\u0443\u043b\u0443 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0430\u043a:<br \/>\n$$\\sigma\\left(n\\right) = \\frac{p_1^{\\alpha_1+1}-1}{p_1-1}\\cdot\\frac{p_2^{\\alpha_2+1}-1}{p_2-1}\\cdot\\ldots\\cdot\\frac{p_k^{\\alpha_k+1}-1}{p_k-1}.$$<\/p>\n<h1>\u0421\u0441\u044b\u043b\u043a\u0438<\/h1>\n<p><a href=\"https:\/\/ideone.com\/tXAY1d\" rel=\"noopener\" target=\"_blank\">\u041a\u043e\u0434 \u0440\u0435\u0448\u0435\u043d\u0438\u044f<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0414\u0430\u043d\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u044b\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u043e\u043b\u0438\u043c\u043f\u0438\u0430\u0434\u044b KPI-OPEN 2018. \u0417\u0430\u0434\u0430\u0447\u0430 \u0416\u0438\u043b-\u0431\u044b\u043b \u0432 \u0442\u0440\u0438\u0434\u0435\u0432\u044f\u0442\u043e\u043c \u0433\u043e\u0441\u0443\u0434\u0430\u0440\u0441\u0442\u0432\u0435 \u043c\u0430\u043b\u044c\u0447\u0438\u043a \u043f\u043e \u0438\u043c\u0435\u043d\u0438 \u041a\u043e\u0441\u0442\u044f. \u041e\u043d \u0431\u044b\u043b \u0441\u0442\u0430\u0440\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0443\u0447\u0435\u043d\u0438\u043a\u043e\u043c \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u043b \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u0441\u043e\u043a\u0438\u0435 \u0431\u0430\u043b\u043b\u044b \u043f\u043e \u0432\u0441\u0435\u043c \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u0430\u043c. \u0418 \u0432\u043e\u0442 \u043d\u0430\u0448 \u0433\u0435\u0440\u043e\u0439 \u043e\u0447\u0435\u043d\u044c \u0437\u0430\u0445\u043e\u0442\u0435\u043b \u0441\u0442\u0430\u0442\u044c \u043e\u0442\u043b\u0438\u0447\u043d\u0438\u043a\u043e\u043c, \u043d\u043e \u0435\u043c\u0443 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u043b\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0431\u0430\u043b\u043b\u043e\u0432 \u043f\u043e \u0430\u043b\u0433\u0435\u0431\u0440\u0435. \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0438\u0445 \u043d\u0430\u0431\u0440\u0430\u0442\u044c, \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u043e\u0440 \u0434\u0430\u043b \u041a\u043e\u0441\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e &hellip; <a href=\"https:\/\/java.mazurok.com\/?p=4318\" class=\"more-link\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":131,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[49],"tags":[300,145,147,573],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/4318"}],"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\/131"}],"replies":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4318"}],"version-history":[{"count":3,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/4318\/revisions"}],"predecessor-version":[{"id":4459,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/4318\/revisions\/4459"}],"wp:attachment":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4318"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4318"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4318"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}