{"id":2002,"date":"2017-06-29T04:53:38","date_gmt":"2017-06-29T01:53:38","guid":{"rendered":"http:\/\/java.mazurok.com\/?p=2002"},"modified":"2017-07-01T20:34:54","modified_gmt":"2017-07-01T17:34:54","slug":"%d0%b0320-%d0%b2%d0%bb%d0%be%d0%b6%d0%b5%d0%bd%d0%bd%d1%8b%d0%b9-%d1%86%d0%b8%d0%ba%d0%bb","status":"publish","type":"post","link":"https:\/\/java.mazurok.com\/?p=2002","title":{"rendered":"\u0410320. \u0412\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u0446\u0438\u043a\u043b"},"content":{"rendered":"<h3><strong>\u0417\u0430\u0434\u0430\u0447\u0430<\/strong><\/h3>\n<p>\u0412\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c [latex] \\sum\\limits_{k = 1}^n (k^3 \\sum\\limits_{l = 1}^m (k-l)^2) [\/latex] \u043f\u0440\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0445 \u0446\u0435\u043b\u044b\u0445 [latex]n[\/latex] \u0438\u00a0[latex]m[\/latex].<\/p>\n<h3><strong>\u0422\u0435\u0441\u0442\u044b<\/strong><\/h3>\n<p>\u0422\u0435\u0441\u0442\u044b \u0431\u044b\u043b\u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u044b \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0435\u0441\u0443\u0440\u0441\u0430 WolframAlpha.<\/p>\n<ul>\n<li><a href=\"https:\/\/www.wolframalpha.com\/input\/?i=sum_(k%3D1)%5E3+(k%5E3*(+sum_(l%3D1)%5E2+(k+-+l)%5E2))\">\u041f\u0435\u0440\u0432\u044b\u0439 \u0442\u0435\u0441\u0442<\/a><\/li>\n<li><a href=\"https:\/\/www.wolframalpha.com\/input\/?i=sum_(k%3D1)%5E2+(k%5E3*(+sum_(l%3D1)%5E9+(k+-+l)%5E2))\">\u0412\u0442\u043e\u0440\u043e\u0439 \u0442\u0435\u0441\u0442<\/a><\/li>\n<li><a href=\"https:\/\/www.wolframalpha.com\/input\/?i=sum_(k%3D1)%5E4+(k%5E3*(+sum_(l%3D1)%5E4+(k+-+l)%5E2))\">\u0422\u0440\u0435\u0442\u0438\u0439 \u0442\u0435\u0441\u0442<\/a><\/li>\n<\/ul>\n<table style=\"height: 135px;width: 272px\">\n<tbody>\n<tr>\n<td style=\"width: 28px\">\u00a0\u2116<\/td>\n<td style=\"width: 55px\">\u00a0 \u00a0 \u00a0n<\/td>\n<td style=\"width: 62px\">\u00a0 \u00a0 \u00a0m<\/td>\n<td style=\"width: 119px\">\u00a0 \u00a0 \u00a0\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 28px\">\u00a0 1<\/td>\n<td style=\"width: 55px\">\u00a0 \u00a0 \u00a03<\/td>\n<td style=\"width: 62px\">\u00a0 \u00a0 \u00a02<\/td>\n<td style=\"width: 119px\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0144<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 28px\">\u00a0 2<\/td>\n<td style=\"width: 55px\">\u00a0 \u00a0 \u00a02<\/td>\n<td style=\"width: 62px\">\u00a0 \u00a0 \u00a09<\/td>\n<td style=\"width: 119px\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1332<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 28px\">\u00a0 3<\/td>\n<td style=\"width: 55px\">\u00a0 \u00a0 \u00a04<\/td>\n<td style=\"width: 62px\">\u00a0 \u00a0 \u00a04<\/td>\n<td style=\"width: 119px\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 1120<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3><strong>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/strong><\/h3>\n<pre class=\"lang:java decode:true\">class ThirdAndHalfLab\r\n{\r\n\tpublic static void main (String[] args)\r\n\t{\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\tint n, m, k, l;\r\n\t\tn = input.nextInt();\r\n\t\tm = input.nextInt();\r\n\t\tlong m_sum = 0, n_sum = 0;\r\n\t\t\r\n\t\tfor(k = 1; k &lt;= n; k++)\r\n\t\t{\r\n\t\t\tfor(l = 1; l &lt;= m; l++)\r\n\t\t\t{\r\n\t\t\t\tm_sum += (k-l)*(k-l);\r\n\t\t\t}\r\n\t\t\tn_sum += k*k*k * m_sum;\r\n\t\t\tm_sum -= m_sum;\t\t\r\n\t\t}\r\n\t\tSystem.out.println(n_sum);\r\n\t}\r\n}<\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u043a\u043e\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0432 \u043e\u0431\u043b\u0430\u043a\u0435 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 &#8212; <a href=\"http:\/\/ideone.com\/sJ4kr2\">Ideone<\/a>.<\/p>\n<p><strong>\u041f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f<\/strong><\/p>\n<p>\u041e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 <span class=\"lang:java decode:true crayon-inline \">n<\/span>\u00a0\u00a0\u0438\u00a0<span class=\"lang:java decode:true crayon-inline \">m<\/span>\u00a0\u0438\u0437 \u043f\u043e\u0442\u043e\u043a\u0430 \u0432\u0432\u043e\u0434\u0430. \u041e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0441\u0443\u043c\u043c:\u00a0<span class=\"lang:java decode:true crayon-inline \">m_sum<\/span>\u00a0\u0434\u043b\u044f \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430 \u043f\u043e [latex]l[\/latex] \u0438\u00a0<span class=\"lang:java decode:true crayon-inline\">n_sum<\/span>\u00a0\u0434\u043b\u044f \u0446\u0438\u043a\u043b\u0430 \u043f\u043e\u00a0[latex]k[\/latex]. \u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0446\u0438\u043a\u043b \u043f\u043e [latex]k[\/latex] \u043e\u0442 1 \u0434\u043e [latex]n[\/latex], \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u043f\u043e [latex]l[\/latex] \u043e\u0442 1 \u0434\u043e [latex]m[\/latex], \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c [latex]\\sum\\limits_{l=1}^m (k-l)^2[\/latex] \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <span class=\"lang:java decode:true crayon-inline \">m_sum<\/span>\u00a0, \u043f\u043e \u0432\u044b\u0445\u043e\u0434\u0443 \u0438\u0437 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 [latex] k^3 * \\sum\\limits_{l = 1}^m (k-l)^2 [\/latex] \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e\u00a0<span class=\"lang:java decode:true crayon-inline\">n_sum<\/span>\u00a0, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043e\u0431\u043d\u0443\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e\u00a0<span class=\"lang:java decode:true crayon-inline \">m_sum<\/span>\u00a0. \u041f\u043e \u0432\u044b\u0445\u043e\u0434\u0443 \u0438\u0437 \u0446\u0438\u043a\u043b\u0430 \u0432\u044b\u0432\u043e\u0434\u0438\u043c \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0443\u043c\u043c\u0443 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u0412\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c [latex] \\sum\\limits_{k = 1}^n (k^3 \\sum\\limits_{l = 1}^m (k-l)^2) [\/latex] \u043f\u0440\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0445 \u0446\u0435\u043b\u044b\u0445 [latex]n[\/latex] \u0438\u00a0[latex]m[\/latex]. \u0422\u0435\u0441\u0442\u044b \u0422\u0435\u0441\u0442\u044b \u0431\u044b\u043b\u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u044b \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0435\u0441\u0443\u0440\u0441\u0430 WolframAlpha. \u041f\u0435\u0440\u0432\u044b\u0439 \u0442\u0435\u0441\u0442 \u0412\u0442\u043e\u0440\u043e\u0439 \u0442\u0435\u0441\u0442 \u0422\u0440\u0435\u0442\u0438\u0439 \u0442\u0435\u0441\u0442 \u00a0\u2116 \u00a0 \u00a0 \u00a0n \u00a0 \u00a0 \u00a0m \u00a0 \u00a0 \u00a0\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u00a0 1 \u00a0 \u00a0 \u00a03 \u00a0 \u00a0 \u00a02 \u00a0 \u00a0 \u00a0 \u00a0 &hellip; <a href=\"https:\/\/java.mazurok.com\/?p=2002\" class=\"more-link\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":93,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,14],"tags":[41,222,223,221,219,75],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/2002"}],"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\/93"}],"replies":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2002"}],"version-history":[{"count":24,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/2002\/revisions"}],"predecessor-version":[{"id":2233,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/2002\/revisions\/2233"}],"wp:attachment":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2002"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2002"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2002"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}