{"id":934,"date":"2016-07-06T11:29:39","date_gmt":"2016-07-06T08:29:39","guid":{"rendered":"http:\/\/java.mazurok.com\/?p=934"},"modified":"2016-07-06T22:33:59","modified_gmt":"2016-07-06T19:33:59","slug":"%d0%b0137%d0%b5","status":"publish","type":"post","link":"https:\/\/java.mazurok.com\/?p=934","title":{"rendered":"\u0410137\u0435"},"content":{"rendered":"<p>\u0414\u0430\u043d\u044b \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u044b\u0435 [latex]n[\/latex], \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 [latex]a_1,\\ldots, a_n[\/latex].<\/p>\n<p>\u0412\u044b\u0432\u0435\u0441\u0442\u0438: [latex]a_1+1!, a_2 +2!,\\ldots, a_n+n![\/latex].<\/p>\n<p>\u0422\u0435\u0441\u0442\u044b:<\/p>\n<table style=\"height: 156px;width: 518px\">\n<tbody>\n<tr>\n<td style=\"width: 68px;text-align: center\">n<\/td>\n<td style=\"width: 68px;text-align: center\">a1<\/td>\n<td style=\"width: 68px;text-align: center\">a2<\/td>\n<td style=\"width: 68px;text-align: center\">a3<\/td>\n<td style=\"width: 68px;text-align: center\">a4<\/td>\n<td style=\"width: 68px;text-align: center\"><\/td>\n<td style=\"width: 68px;text-align: center\"><\/td>\n<td style=\"width: 68px;text-align: center\"><\/td>\n<td style=\"width: 68px;text-align: center\"><\/td>\n<td style=\"width: 68px;text-align: center\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 68px;text-align: center\">4<\/td>\n<td style=\"width: 68px;text-align: center\">1<\/td>\n<td style=\"width: 68px;text-align: center\">2<\/td>\n<td style=\"width: 68px;text-align: center\">3<\/td>\n<td style=\"width: 68px;text-align: center\">4<\/td>\n<td style=\"width: 68px;text-align: center\">Output<\/td>\n<td style=\"width: 68px;text-align: center\">2<\/td>\n<td style=\"width: 68px;text-align: center\">4<\/td>\n<td style=\"width: 68px;text-align: center\">9<\/td>\n<td style=\"width: 68px;text-align: center\">28<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 68px;text-align: center\">4<\/td>\n<td style=\"width: 68px;text-align: center\">0.1<\/td>\n<td style=\"width: 68px;text-align: center\">0.2<\/td>\n<td style=\"width: 68px;text-align: center\">0.3<\/td>\n<td style=\"width: 68px;text-align: center\">0.4<\/td>\n<td style=\"width: 68px;text-align: center\">Output<\/td>\n<td style=\"width: 68px;text-align: center\">1.1<\/td>\n<td style=\"width: 68px;text-align: center\">2.2<\/td>\n<td style=\"width: 68px;text-align: center\">6.3<\/td>\n<td style=\"width: 68px;text-align: center\">24.4<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\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\t\r\n\tpublic static void main (String[] args) throws java.lang.Exception {\r\n\t\t\r\n\t\tint n;\r\n\t\tdouble a, fact = 1.0;\r\n\t\tScanner scanner = new Scanner(System.in);\r\n\t\tn = scanner.nextInt(); \/\/\u0447\u0438\u0442\u0430\u0435\u043c n\r\n\t\t\r\n\t\tfor(int k = 1; k &lt;= n; k++) {\r\n\t\t\t\r\n\t\t\ta = scanner.nextDouble(); \/\/\u0447\u0438\u0442\u0430\u0435\u043c \u0438\u0437 \u043f\u043e\u0442\u043e\u043a\u0430 k-\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \r\n\t\t\tfact *= k; \/\/\u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u043c \u0444\u0430\u0442\u043e\u0440\u0438\u0430\u043b\r\n\t\t\tSystem.out.print( (a+fact) + \" \"); \/\/\u0432\u044b\u0432\u043e\u0434\u0438\u043c \u0441\u0443\u043c\u043c\u0443 \u0446\u0438\u0444\u0440\u044b \u0438\u0437 \u043f\u043e\u0442\u043e\u043a\u0430 \u0438 \u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0430\u043b\u0430\r\n\t\t}\r\n\t}\r\n}<\/pre>\n<p><a href=\"http:\/\/ideone.com\/iMCiMT\" target=\"_blank\">www.ideone.com<\/a><\/p>\n<p>\u041e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0430\u043b\u0430 \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0438\u0437 \u043f\u043e\u0442\u043e\u043a\u0430 \u0442\u0438\u043f\u0430 [latex]double[\/latex]. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0446\u0438\u043a\u043b for, \u043e\u0442 [latex]1[\/latex] \u0434\u043e [latex]n[\/latex]. \u0414\u0430\u043b\u044c\u0448\u0435 \u0432 \u0442\u0435\u043b\u0435 \u0446\u0438\u043a\u043b\u0430 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0447\u0442\u0435\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0430\u043b\u0430 \u0438 \u0432\u044b\u0432\u043e\u0434 \u0441\u0443\u043c\u043c\u044b \u0446\u0438\u0444\u0440 \u0438\u0437 \u043f\u043e\u0442\u043e\u043a\u0430 \u0438 \u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0430\u043b\u0430.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0414\u0430\u043d\u044b \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u044b\u0435 [latex]n[\/latex], \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 [latex]a_1,\\ldots, a_n[\/latex]. \u0412\u044b\u0432\u0435\u0441\u0442\u0438: [latex]a_1+1!, a_2 +2!,\\ldots, a_n+n![\/latex]. \u0422\u0435\u0441\u0442\u044b: n a1 a2 a3 a4 4 1 2 3 4 Output 2 4 9 28 4 0.1 0.2 0.3 0.4 Output 1.1 2.2 6.3 24.4 &nbsp; import java.util.*; import java.lang.*; import java.io.*; class Main { public static void main (String[] args) throws java.lang.Exception &hellip; <a href=\"https:\/\/java.mazurok.com\/?p=934\" class=\"more-link\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":82,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[139,140],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/934"}],"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\/82"}],"replies":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=934"}],"version-history":[{"count":7,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/934\/revisions"}],"predecessor-version":[{"id":1063,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/934\/revisions\/1063"}],"wp:attachment":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=934"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=934"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=934"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}