{"id":1831,"date":"2017-05-28T11:36:41","date_gmt":"2017-05-28T08:36:41","guid":{"rendered":"http:\/\/java.mazurok.com\/?p=1831"},"modified":"2017-11-26T23:12:39","modified_gmt":"2017-11-26T20:12:39","slug":"a153_%d0%bf%d0%be%d1%82%d0%be%d0%ba%d0%be%d0%b2%d0%b0%d1%8f-%d0%be%d0%b1%d1%80%d0%b0%d0%b1%d0%be%d1%82%d0%ba%d0%b0","status":"publish","type":"post","link":"https:\/\/java.mazurok.com\/?p=1831","title":{"rendered":"A153.\u041f\u043e\u0442\u043e\u043a\u043e\u0432\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430"},"content":{"rendered":"<p><strong>\u0423\u0441\u043b\u043e\u0432\u0438\u0435<\/strong><br \/>\n\u0414\u0430\u043d\u044b \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e [latex]n[\/latex], \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0447\u0438\u0441\u043b\u0430 [latex]x[\/latex], [latex]a_{n}, a_{n-1}, \\ldots, a_{0}[\/latex]. \u0412\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%A1%D1%85%D0%B5%D0%BC%D0%B0_%D0%93%D0%BE%D1%80%D0%BD%D0%B5%D1%80%D0%B0\">\u0441\u0445\u0435\u043c\u0443 \u0413\u043e\u0440\u043d\u0435\u0440\u0430<\/a>, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 [latex]a_{n}{x}^{n} + a_{n-1}{x}^{n-1} + \\cdots + a_{0}.[\/latex]\n[latex]a_{n}{x}^{n} + a_{n-1}{x}^{n-1} + \\cdots + a_{0} = \\left( \\ldots \\left(a_{n}{x} + a_{n-1}\\right)x + \\cdots + a_{1}\\right)x + a_{0}.[\/latex]\n<table>\n<tbody>\n<tr>\n<td style=\"width: 63.2833px;text-align: center\">$latex n$<\/td>\n<td style=\"width: 63.2833px;text-align: center\">$latex x$<\/td>\n<td style=\"width: 63.2833px;text-align: center\">$latex { a }_{ n }$<\/td>\n<td style=\"width: 63.2833px;text-align: center\">$latex { a }_{ n-1 }$<\/td>\n<td style=\"width: 63.2833px;text-align: center\">$latex { a }_{ n-2 }$<\/td>\n<td style=\"width: 63.3px;text-align: center\">$latex { a }_{ n-3 }$<\/td>\n<td style=\"width: 63.2833px;text-align: center\">$latex s$<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 63.2833px;text-align: center\">3<\/td>\n<td style=\"width: 63.2833px;text-align: center\">2<\/td>\n<td style=\"width: 63.2833px;text-align: center\">5<\/td>\n<td style=\"width: 63.2833px;text-align: center\">4<\/td>\n<td style=\"width: 63.2833px;text-align: center\">3<\/td>\n<td style=\"width: 63.3px;text-align: center\">2<\/td>\n<td style=\"width: 63.2833px;text-align: center\">64<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 63.2833px;text-align: center\">2<\/td>\n<td style=\"width: 63.2833px;text-align: center\">1<\/td>\n<td style=\"width: 63.2833px;text-align: center\">3<\/td>\n<td style=\"width: 63.2833px;text-align: center\">4<\/td>\n<td style=\"width: 63.2833px;text-align: center\">7<\/td>\n<td style=\"width: 63.3px;text-align: center\">_<\/td>\n<td style=\"width: 63.2833px;text-align: center\">14<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 63.2833px;text-align: center\">3<\/td>\n<td style=\"width: 63.2833px;text-align: center\">0<\/td>\n<td style=\"width: 63.2833px;text-align: center\">3<\/td>\n<td style=\"width: 63.2833px;text-align: center\">4<\/td>\n<td style=\"width: 63.2833px;text-align: center\">12<\/td>\n<td style=\"width: 63.3px;text-align: center\">8<\/td>\n<td style=\"width: 63.2833px;text-align: center\">8<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 63.2833px;text-align: center\">3<\/td>\n<td style=\"width: 63.2833px;text-align: center\">5<\/td>\n<td style=\"width: 63.2833px;text-align: center\">0<\/td>\n<td style=\"width: 63.2833px;text-align: center\">10<\/td>\n<td style=\"width: 63.2833px;text-align: center\">12<\/td>\n<td style=\"width: 63.3px;text-align: center\">8<\/td>\n<td style=\"width: 63.2833px;text-align: center\">318<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 63.2833px;text-align: center\">1<\/td>\n<td style=\"width: 63.2833px;text-align: center\">5<\/td>\n<td style=\"width: 63.2833px;text-align: center\">2<\/td>\n<td style=\"width: 63.2833px;text-align: center\">1<\/td>\n<td style=\"width: 63.2833px;text-align: center\">_<\/td>\n<td style=\"width: 63.3px;text-align: center\">_<\/td>\n<td style=\"width: 63.2833px;text-align: center\">11<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<pre class=\"lang:java decode:true  \">package lab4;\r\nimport java.util.Scanner;\r\npublic class Lab4 \r\n{\r\n    public static void main(String[] args) \r\n    {\r\n        Scanner scanIn=new Scanner(System.in); \r\n        int n, x;\r\n        n = scanIn.nextInt();\r\n        x = scanIn.nextInt();\r\n        int a[] = new int[n + 1];\r\n        for (int i = n; i &gt;= 0; --i) \r\n        {\r\n            a[i] = scanIn.nextInt();\r\n        }\r\n        int s = a[n];\r\n        for (int i = 1; i &lt;= n; ++i) \r\n        {\r\n            s *= x; \r\n            s += a[n - i];\r\n        }\r\n     \r\n        System.out.println(\"S = \" + s);\r\n    }\r\n}<\/pre>\n<p><strong>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/strong><br \/>\n\u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0441 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 \u0441 \u0440\u044f\u0434\u043e\u043c \u0441 $latex X$<span id=\"MathJax-Element-15-Frame\" class=\"MathJax_SVG\"><\/span>-\u043e\u043c c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u044c\u044e, \u0443 \u043d\u0430\u0441 \u044d\u0442\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442 $latex { a }_{ n }$<span id=\"MathJax-Element-16-Frame\" class=\"MathJax_SVG\"><\/span>, \u043c\u044b \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043c\u043d\u043e\u0436\u0430\u0435\u043c \u0435\u0433\u043e (\u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442) \u043d\u0430 $latex X$<span id=\"MathJax-Element-17-Frame\" class=\"MathJax_SVG\"><\/span>, \u0430 \u043f\u043e\u0442\u043e\u043c \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0441\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439.<br \/>\n\u042d\u0442\u043e \u0431\u044b\u043b \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f$latex n$=2 <span id=\"MathJax-Element-18-Frame\" class=\"MathJax_SVG\"><\/span>, \u0435\u0441\u043b\u0438 \u0436\u0435$latex X$ &gt; 2 <span id=\"MathJax-Element-19-Frame\" class=\"MathJax_SVG\"><\/span>, \u0442\u043e \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0434\u043b\u044f $latex n$=2<span id=\"MathJax-Element-20-Frame\" class=\"MathJax_SVG\"><\/span>, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e\u00a0$latex X$ &#8212; 2 <span id=\"MathJax-Element-21-Frame\" class=\"MathJax_SVG\"><\/span> \u0440\u0430\u0437 \u0443\u043c\u043d\u043e\u0436\u0430\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0430\u00a0$latex X$ <span id=\"MathJax-Element-22-Frame\" class=\"MathJax_SVG\"><\/span> \u0438 \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442.<\/p>\n<p><a href=\"https:\/\/ideone.com\/rZidGe\">Ideone.com<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0414\u0430\u043d\u044b \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e [latex]n[\/latex], \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0447\u0438\u0441\u043b\u0430 [latex]x[\/latex], [latex]a_{n}, a_{n-1}, \\ldots, a_{0}[\/latex]. \u0412\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u0445\u0435\u043c\u0443 \u0413\u043e\u0440\u043d\u0435\u0440\u0430, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 [latex]a_{n}{x}^{n} + a_{n-1}{x}^{n-1} + \\cdots + a_{0}.[\/latex] [latex]a_{n}{x}^{n} + a_{n-1}{x}^{n-1} + \\cdots + a_{0} = \\left( \\ldots \\left(a_{n}{x} + a_{n-1}\\right)x + \\cdots + a_{1}\\right)x + a_{0}.[\/latex] $latex n$ $latex x$ $latex { a }_{ n }$ $latex { &hellip; <a href=\"https:\/\/java.mazurok.com\/?p=1831\" class=\"more-link\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":91,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[141],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/1831"}],"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\/91"}],"replies":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1831"}],"version-history":[{"count":29,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/1831\/revisions"}],"predecessor-version":[{"id":3234,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/1831\/revisions\/3234"}],"wp:attachment":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1831"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1831"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1831"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}