{"id":943,"date":"2016-07-06T11:34:27","date_gmt":"2016-07-06T08:34:27","guid":{"rendered":"http:\/\/java.mazurok.com\/?p=943"},"modified":"2016-07-08T08:01:57","modified_gmt":"2016-07-08T05:01:57","slug":"a137g","status":"publish","type":"post","link":"https:\/\/java.mazurok.com\/?p=943","title":{"rendered":"\u0410137\u0433"},"content":{"rendered":"<p>\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\u0435 \u0447\u0438\u0441\u043b\u0430 [latex]a_{1}, a_{2}, \\ldots a_{n}[\/latex].<br \/>\n\u0412\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c: [latex]a_{1},-a_{1}a_{2},a_{1}a_{2}a_{3}, \\ldots (-1)^{n+1}a_{1}a_{2} \\ldots a_{n}[\/latex].<\/p>\n<p>\u0420\u0435\u0448\u0435\u043d\u0438\u0435. \u0412\u0432\u043e\u0434\u0438\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e [latex]n[\/latex], \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e a(\u043a\u0443\u0434\u0430 \u0431\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u0447\u0438\u0441\u043b\u0430), \u0430 \u0442\u0430\u043a \u0436\u0435 [latex]f[\/latex]-\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. \u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0432 \u0446\u0438\u043a\u043b\u0435 \u0443\u0436\u0435 \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0443\u043c\u043d\u043e\u0436\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0447\u0438\u0441\u043b\u043e \u0432\u0437\u044f\u0442\u043e\u0435 \u0441 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u044b\u043c \u0437\u043d\u0430\u043a\u043e\u043c, \u0430 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e [latex]&#187;f&#187;[\/latex] \u0440\u0430\u0432\u043d\u0430 [latex]&#187;-1&#8243;[\/latex] \u0442\u0430\u043a \u043a\u0430\u043a &#171;\u041e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0441\u043e\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u043c [latex](-a_{i})[\/latex]&#187;.<\/p>\n<p>\u0422\u0435\u0441\u0442\u044b:<br \/>\n[latex]n=3[\/latex]\n<table width=\"100%\">\n<tbody>\n<tr style=\"height: 24px\">\n<td style=\"height: 24px;text-align: center\"><strong>\u0427\u0438\u0441\u043b\u0430[latex](a_{n})[\/latex]<\/strong><\/td>\n<td style=\"height: 24px;text-align: center\"><strong>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 24px\">\n<td style=\"height: 24px;text-align: center\">1<\/td>\n<td style=\"height: 24px;text-align: center\">1<\/td>\n<\/tr>\n<tr style=\"height: 24px\">\n<td style=\"height: 24px;text-align: center\">2<\/td>\n<td style=\"height: 24px;text-align: center\">-2<\/td>\n<\/tr>\n<tr style=\"height: 24px\">\n<td style=\"height: 24px;text-align: center\">3<\/td>\n<td style=\"height: 24px;text-align: center\">6<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n[latex]n=7[\/latex]\n<table width=\"100%\">\n<tbody>\n<tr style=\"height: 24px\">\n<td style=\"height: 24px;text-align: center\"><strong>\u0427\u0438\u0441\u043b\u0430[latex](a_{n})[\/latex]<\/strong><\/td>\n<td style=\"height: 24px;text-align: center\"><strong>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 24px\">\n<td style=\"height: 24px;text-align: center\">1.8<\/td>\n<td style=\"height: 24px;text-align: center\">1.8<\/td>\n<\/tr>\n<tr style=\"height: 24px\">\n<td style=\"height: 24px;text-align: center\">3.9<\/td>\n<td style=\"height: 24px;text-align: center\">-7.02<\/td>\n<\/tr>\n<tr style=\"height: 24px\">\n<td style=\"height: 24px;text-align: center\">0.0001<\/td>\n<td style=\"height: 24px;text-align: center\">0.000702<\/td>\n<\/tr>\n<tr style=\"height: 24px\">\n<td style=\"height: 24px;text-align: center\">-79<\/td>\n<td style=\"height: 24px;text-align: center\">0.055458<\/td>\n<\/tr>\n<tr style=\"height: 24px\">\n<td style=\"height: 24px;text-align: center\">456.98<\/td>\n<td style=\"height: 24px;text-align: center\">-25.3432<\/td>\n<\/tr>\n<tr style=\"height: 24px\">\n<td style=\"height: 24px;text-align: center\">0.9001<\/td>\n<td style=\"height: 24px;text-align: center\">22.8114<\/td>\n<\/tr>\n<tr style=\"height: 24px\">\n<td style=\"height: 24px;text-align: center\">4<\/td>\n<td style=\"height: 24px;text-align: center\">-91.2456<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u041a\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b:<\/p>\n<pre class=\"lang:java decode:true \">import java.util.*;\r\nimport java.lang.*;\r\nimport java.io.*;\r\n\r\nclass Ideone {\r\n\tpublic static void main (String[] args) {\r\n\t\tint n; \/\/\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u0432\u043e\u0434\u0438\u043c\u044b\u0445 \u0447\u0438\u0441\u0435\u043b.\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tn = sc.nextInt();\r\n\t\tdouble a,f; \/\/\u0430-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430 \u0434\u043b\u044f \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0447\u0438\u0441\u0435\u043b, f-\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, m-\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438\u0437 f \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u044b\u0439 \u043d\u0430 -1 \u0432 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 n+1.\r\n\t\tf = -1;\r\n\t\tfor (int k=1; k&lt;=n; ++k) {\r\n\t\t\ta = sc.nextDouble();\r\n\t\t\tf *= -a;\r\n\t\t\tSystem.out.print(f);\r\n\t\t\tif (k &lt; n) System.out.print(\", \");\r\n\t\t\telse System.out.print(\".\");\r\n\t\t}\r\n\t}\r\n}<\/pre>\n<p><a href=\"http:\/\/ideone.com\/IHIPX6\" target=\"_blank\">\u041a\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\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\u0435 \u0447\u0438\u0441\u043b\u0430 [latex]a_{1}, a_{2}, \\ldots a_{n}[\/latex]. \u0412\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c: [latex]a_{1},-a_{1}a_{2},a_{1}a_{2}a_{3}, \\ldots (-1)^{n+1}a_{1}a_{2} \\ldots a_{n}[\/latex]. \u0420\u0435\u0448\u0435\u043d\u0438\u0435. \u0412\u0432\u043e\u0434\u0438\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e [latex]n[\/latex], \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e a(\u043a\u0443\u0434\u0430 \u0431\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u0447\u0438\u0441\u043b\u0430), \u0430 \u0442\u0430\u043a \u0436\u0435 [latex]f[\/latex]-\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. \u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0432 \u0446\u0438\u043a\u043b\u0435 \u0443\u0436\u0435 \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0443\u043c\u043d\u043e\u0436\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0447\u0438\u0441\u043b\u043e \u0432\u0437\u044f\u0442\u043e\u0435 \u0441 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u044b\u043c \u0437\u043d\u0430\u043a\u043e\u043c, \u0430 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e [latex]&#187;f&#187;[\/latex] \u0440\u0430\u0432\u043d\u0430 [latex]&#187;-1&#8243;[\/latex] \u0442\u0430\u043a \u043a\u0430\u043a &#171;\u041e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0435 &hellip; <a href=\"https:\/\/java.mazurok.com\/?p=943\" class=\"more-link\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":81,"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\/943"}],"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\/81"}],"replies":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=943"}],"version-history":[{"count":12,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/943\/revisions"}],"predecessor-version":[{"id":1125,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/943\/revisions\/1125"}],"wp:attachment":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=943"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=943"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=943"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}