{"id":1476,"date":"2016-10-16T17:23:01","date_gmt":"2016-10-16T14:23:01","guid":{"rendered":"http:\/\/java.mazurok.com\/?p=1476"},"modified":"2016-11-01T20:14:29","modified_gmt":"2016-11-01T17:14:29","slug":"%d0%b0136%d0%b5","status":"publish","type":"post","link":"https:\/\/java.mazurok.com\/?p=1476","title":{"rendered":"\u0410136\u0435"},"content":{"rendered":"<h2>\u041f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438<\/h2>\n<h3>\u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h3>\n<p>\u0414\u0430\u043d\u044b \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e [latex]n[\/latex] \u0438 \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]\n<h3>\u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h3>\n<p>\u0412\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c [latex]a_{1}+a_{2}+\\cdots+a_{n}[\/latex] \u0438 [latex]a_{1}a_{2}\\cdots a_{n}[\/latex].<\/p>\n<h3>\u041a\u043e\u0434<\/h3>\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{\r\n\tpublic static void main (String[] args) throws java.lang.Exception\r\n\t{\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\tint n = in.nextInt();\r\n\t\tdouble s = 0, p = 1, a = 0;\r\n\t\tfor( int i = 0; i &lt; n; i++ ){\r\n\t\t\ta = in.nextInt();\r\n\t\t\ts += a;\r\n\t\t\tp *= a;\r\n\t\t}\r\n\t\tSystem.out.println(s);\r\n\t\tSystem.out.print(p);\r\n\t}\r\n}<\/pre>\n<h3>\u0422\u0435\u0441\u0442\u044b<\/h3>\n<table style=\"width: 216px\">\n<tbody>\n<tr style=\"height: 2.21667px\">\n<td style=\"width: 10px;height: 2.21667px;text-align: center\">n<\/td>\n<td style=\"width: 79.95px;height: 2.21667px;text-align: center\">[latex]a_{1}, a_{2}, \\cdots, a_{n}[\/latex]<\/td>\n<td style=\"width: 10px;height: 2.21667px;text-align: center\">s<\/td>\n<td style=\"width: 10px;height: 2.21667px;text-align: center\">p<\/td>\n<\/tr>\n<tr style=\"height: 24px\">\n<td style=\"width: 10px;height: 24px;text-align: center\">2<\/td>\n<td style=\"width: 79.95px;height: 24px;text-align: center\">3 4<\/td>\n<td style=\"width: 10px;height: 24px;text-align: center\">7<\/td>\n<td style=\"width: 10px;height: 24px;text-align: center\">12<\/td>\n<\/tr>\n<tr style=\"height: 24px\">\n<td style=\"width: 10px;height: 24px;text-align: center\">4<\/td>\n<td style=\"width: 79.95px;height: 24px;text-align: center\">1 3 5 7<\/td>\n<td style=\"width: 10px;height: 24px;text-align: center\">16<\/td>\n<td style=\"width: 10px;height: 24px;text-align: center\">105<\/td>\n<\/tr>\n<tr style=\"height: 24px\">\n<td style=\"width: 10px;height: 24px;text-align: center\">6<\/td>\n<td style=\"width: 79.95px;height: 24px;text-align: center\">2 2 3 3 4 4<\/td>\n<td style=\"width: 10px;height: 24px;text-align: center\">18<\/td>\n<td style=\"width: 10px;height: 24px;text-align: center\">576<\/td>\n<\/tr>\n<tr style=\"height: 24px\">\n<td style=\"width: 10px;height: 24px;text-align: center\">1<\/td>\n<td style=\"width: 79.95px;height: 24px;text-align: center\">9<\/td>\n<td style=\"width: 10px;height: 24px;text-align: center\">9<\/td>\n<td style=\"width: 10px;height: 24px;text-align: center\">9<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<h3>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0412 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0437\u0430\u0434\u0430\u0435\u043c \u0447\u0438\u0441\u043b\u043e [latex]n[\/latex]\u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u0443\u043c\u043c \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0438 [latex]a[\/latex]\u2014 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0441\u0443\u043c\u043c \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f;\u00a0 [latex]n[\/latex] \u0438 [latex]a[\/latex] \u0432\u0432\u043e\u0434\u0438\u043c \u0441 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b. \u0412 \u0446\u0438\u043a\u043b\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0441\u0443\u043c\u043c\u0443 \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435.<\/p>\n<p><a href=\"http:\/\/ideone.com\/MeHDQd\">http:\/\/ideone.com<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438 \u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0414\u0430\u043d\u044b \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e [latex]n[\/latex] \u0438 \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\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0412\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c [latex]a_{1}+a_{2}+\\cdots+a_{n}[\/latex] \u0438 [latex]a_{1}a_{2}\\cdots a_{n}[\/latex]. \u041a\u043e\u0434 import java.util.*; import java.lang.*; import java.io.*; class Ideone { public static void main (String[] args) throws java.lang.Exception { Scanner in = new Scanner(System.in); int n = in.nextInt(); double s = 0, p &hellip; <a href=\"https:\/\/java.mazurok.com\/?p=1476\" class=\"more-link\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":85,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[75],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/1476"}],"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\/85"}],"replies":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1476"}],"version-history":[{"count":19,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/1476\/revisions"}],"predecessor-version":[{"id":1614,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/1476\/revisions\/1614"}],"wp:attachment":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1476"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1476"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1476"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}