{"id":4926,"date":"2019-05-30T22:53:03","date_gmt":"2019-05-30T19:53:03","guid":{"rendered":"http:\/\/java.mazurok.com\/?p=4926"},"modified":"2020-09-13T20:36:28","modified_gmt":"2020-09-13T17:36:28","slug":"e-olymp-913-%d0%b8%d1%81%d0%bf%d0%be%d0%bb%d1%8c%d0%b7%d1%83%d0%b9-%d0%bf%d0%be%d0%b4%d0%bf%d1%80%d0%be%d0%b3%d1%80%d0%b0%d0%bc%d0%bc%d1%83","status":"publish","type":"post","link":"https:\/\/java.mazurok.com\/?p=4926","title":{"rendered":"e-olymp 913. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439 \u043f\u043e\u0434\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443"},"content":{"rendered":"<h1>\u0417\u0430\u0434\u0430\u0447\u0430<\/h1>\n<p>\u0412\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0441\u0443\u043c\u043c\u0443 \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 $n$ \u043f\u0430\u0440 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0438\u0441\u044c \u043f\u043e\u0434\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439 $SumDob$ \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0441\u0443\u043c\u043c\u044b \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b.<\/p>\n<h1>\u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h1>\n<p>\u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0437\u0430\u0434\u0430\u043d\u043e \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e $n$ &#8212; \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u0440 \u0447\u0438\u0441\u0435\u043b. \u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 $n$ \u0441\u0442\u0440\u043e\u043a\u0430\u0445 \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u0431\u0435\u043b \u0437\u0430\u0434\u0430\u043d\u043e \u043f\u043e $2$ \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0447\u0438\u0441\u043b\u0430. \u0412\u0441\u0435 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e \u043d\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u044e\u0442 $100$.<\/p>\n<h1>\u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h1>\n<p>\u0412 $n$ \u0441\u0442\u0440\u043e\u043a\u0430\u0445 \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u0431\u0435\u043b \u043f\u043e \u0434\u0432\u0430 \u0447\u0438\u0441\u043b\u0430: \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0443\u043c\u043c\u0443, \u0430 \u043f\u043e\u0442\u043e\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u043f\u0430\u0440\u044b \u0447\u0438\u0441\u0435\u043b. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0441 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e $4$ \u0437\u043d\u0430\u043a\u0430 \u043f\u043e\u0441\u043b\u0435 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438.<\/p>\n<h1>\u0422\u0435\u0441\u0442\u044b<\/h1>\n<table>\n<tbody>\n<tr>\n<th>#<\/th>\n<th>\u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/th>\n<th>\u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/th>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>2<br \/>\n6 7.5<br \/>\n2.1 2.0<\/td>\n<td>13.5000 45.0000<br \/>\n4.1000 4.2000<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>4<br \/>\n2 5<br \/>\n3 5<br \/>\n4 5<br \/>\n5 5<\/td>\n<td>7.0000 10.0000<br \/>\n8.0000 15.0000<br \/>\n9.0000 20.0000<br \/>\n10.0000 25.0000<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>2<br \/>\n100 100<br \/>\n56 65<\/td>\n<td>200.0000 10000.0000<br \/>\n121.0000 3640.0000<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>6<br \/>\n10 10<br \/>\n20 20<br \/>\n40 40<br \/>\n50 50<br \/>\n70 70<br \/>\n80 80<\/td>\n<td>20.0000 100.0000<br \/>\n40.0000 400.0000<br \/>\n80.0000 1600.0000<br \/>\n100.0000 2500.0000<br \/>\n140.0000 4900.0000<br \/>\n160.0000 6400.0000<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>1<br \/>\n2 2<\/td>\n<td>4 4<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\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{\r\n\tpublic static void main (String[] args) throws java.lang.Exception \r\n\t{\r\n\t\tint n;\r\n\t\tScanner in = new Scanner (System.in);\r\n\t\tn = in.nextInt();\r\n\t\tfor(int i = 0; i &lt; n; i++){\r\n\t\t\tdouble a, b;\r\n\t\t\ta = in.nextDouble();\r\n\t\t\tb = in.nextDouble();\r\n\t\t\tSystem.out.printf(\"%.4f\", SumDob(a, b)[0]);\r\n\t\t\tSystem.out.printf(\" \");\r\n\t\t\tSystem.out.printf(\"%.4f\", SumDob(a, b)[1]);\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}\r\n\tstatic double[] SumDob(double x, double y) {\r\n\t\treturn new double[] {x + y, x * y};\r\n\t}\r\n}<\/pre>\n<h2>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/h2>\n<p>\u041a\u0430\u043a \u0438 \u0431\u044b\u043b\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u0437\u0430\u0434\u0430\u0447\u0438, \u043f\u0440\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u043f\u043e\u0434\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 $SumDob$, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0443\u043c\u043c\u0443 \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0434\u0432\u0443\u0445 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b $a$ \u0438 $b$. \u041f\u043e\u0442\u043e\u043c \u043c\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0446\u0438\u043a\u043b\u0430 \u0432\u044b\u0432\u043e\u0434\u0438\u043c \u043f\u0430\u0440\u0443 \u0447\u0438\u0441\u0435\u043b, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0438\u0437 \u043f\u043e\u0434\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b $SumDob$ $n$ \u0440\u0430\u0437 \u0441 $n$ \u043f\u0430\u0440 \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<\/p>\n<p>\u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 <a href=\"https:\/\/www.e-olymp.com\/ru\/problems\/913\" target=\"_blank\" rel=\"noopener noreferrer\">e-olymp<\/a><br \/>\n\u041a\u043e\u0434 \u0440\u0435\u0448\u0435\u043d\u0438\u044f &#8212; <a href=\"https:\/\/ideone.com\/Z6WNJZ\" target=\"_blank\" rel=\"noopener noreferrer\">ideone<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u0412\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0441\u0443\u043c\u043c\u0443 \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 $n$ \u043f\u0430\u0440 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0438\u0441\u044c \u043f\u043e\u0434\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439 $SumDob$ \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0441\u0443\u043c\u043c\u044b \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. \u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0437\u0430\u0434\u0430\u043d\u043e \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e $n$ &#8212; \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u0440 \u0447\u0438\u0441\u0435\u043b. \u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 $n$ \u0441\u0442\u0440\u043e\u043a\u0430\u0445 \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u0431\u0435\u043b \u0437\u0430\u0434\u0430\u043d\u043e \u043f\u043e $2$ \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0447\u0438\u0441\u043b\u0430. \u0412\u0441\u0435 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e \u043d\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u044e\u0442 $100$. \u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 &hellip; <a href=\"https:\/\/java.mazurok.com\/?p=4926\" class=\"more-link\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":113,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[687,146,147,71],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/4926"}],"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\/113"}],"replies":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4926"}],"version-history":[{"count":1,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/4926\/revisions"}],"predecessor-version":[{"id":4927,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/4926\/revisions\/4927"}],"wp:attachment":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4926"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4926"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4926"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}