{"id":1978,"date":"2017-06-29T02:50:13","date_gmt":"2017-06-28T23:50:13","guid":{"rendered":"http:\/\/java.mazurok.com\/?p=1978"},"modified":"2017-07-01T20:06:57","modified_gmt":"2017-07-01T17:06:57","slug":"e-olymp-108-%d1%81%d1%80%d0%b5%d0%b4%d0%bd%d0%b5%d0%b5-%d1%87%d0%b8%d1%81%d0%bb%d0%be","status":"publish","type":"post","link":"https:\/\/java.mazurok.com\/?p=1978","title":{"rendered":"e-olymp 108. \u0421\u0440\u0435\u0434\u043d\u0435\u0435 \u0447\u0438\u0441\u043b\u043e"},"content":{"rendered":"<h3><strong>\u0417\u0430\u0434\u0430\u0447\u0430<\/strong><\/h3>\n<p>\u0414\u0430\u043d\u043e \u0442\u0440\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0447\u0438\u0441\u043b\u0430 [latex]a[\/latex],\u00a0[latex]b[\/latex],\u00a0[latex]c[\/latex]. \u0412\u044b\u0432\u0435\u0441\u0442\u0438 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0438\u0437 \u043d\u0438\u0445.<\/p>\n<p>\u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0430 <a href=\"https:\/\/www.e-olymp.com\/ru\/problems\/108\">e-olymp<\/a>.<\/p>\n<h3>\u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h3>\n<p>\u0427\u0438\u0441\u043b\u0430\u00a0 [latex]a[\/latex],\u00a0[latex]b[\/latex],\u00a0[latex]c[\/latex] &#8212; \u0446\u0435\u043b\u044b\u0435 \u0438 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e \u043d\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u044e\u0442 1000.<\/p>\n<h3>\u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h3>\n<p>\u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e &#8212; \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0437\u0430\u0434\u0430\u0447\u0443.<\/p>\n<h3><strong>\u0422\u0435\u0441\u0442\u044b<\/strong><\/h3>\n<table style=\"height: 200px;width: 385px\">\n<tbody>\n<tr>\n<td style=\"width: 32px\">\u00a0\u2116<\/td>\n<td style=\"width: 72px\">\u00a0 \u00a0 \u00a0 \u00a0 a<\/td>\n<td style=\"width: 75px\">\u00a0 \u00a0 \u00a0 \u00a0 b<\/td>\n<td style=\"width: 77px\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0c<\/td>\n<td style=\"width: 107px\">\u00a0 \u00a0 \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 32px\">\u00a0 1<\/td>\n<td style=\"width: 72px\">\u00a0 \u00a0 \u00a0 \u00a0 5<\/td>\n<td style=\"width: 75px\">\u00a0 \u00a0 \u00a0 \u00a0 7<\/td>\n<td style=\"width: 77px\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a09<\/td>\n<td style=\"width: 107px\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a07<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 32px\">\u00a0 2<\/td>\n<td style=\"width: 72px\">\u00a0 \u00a0 \u00a0 \u00a0 7<\/td>\n<td style=\"width: 75px\">\u00a0 \u00a0 \u00a0 \u00a0 5<\/td>\n<td style=\"width: 77px\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a09<\/td>\n<td style=\"width: 107px\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a07<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 32px\">\u00a0 3<\/td>\n<td style=\"width: 72px\">\u00a0 \u00a0 \u00a0 \u00a0 9<\/td>\n<td style=\"width: 75px\">\u00a0 \u00a0 \u00a0 \u00a0 7<\/td>\n<td style=\"width: 77px\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a05<\/td>\n<td style=\"width: 107px\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a07<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 32px\">\u00a0 4<\/td>\n<td style=\"width: 72px\">\u00a0 \u00a0 \u00a0 \u00a0 7<\/td>\n<td style=\"width: 75px\">\u00a0 \u00a0 \u00a0 \u00a0 9<\/td>\n<td style=\"width: 77px\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a05<\/td>\n<td style=\"width: 107px\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a07<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 32px\">\u00a0 5<\/td>\n<td style=\"width: 72px\">\u00a0 \u00a0 \u00a0 \u00a0 5<\/td>\n<td style=\"width: 75px\">\u00a0 \u00a0 \u00a0 \u00a0 9<\/td>\n<td style=\"width: 77px\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a07<\/td>\n<td style=\"width: 107px\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a07<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 32px\">\u00a0 6<\/td>\n<td style=\"width: 72px\">\u00a0 \u00a0 \u00a0 \u00a0 9<\/td>\n<td style=\"width: 75px\">\u00a0 \u00a0 \u00a0 \u00a0 5<\/td>\n<td style=\"width: 77px\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a07<\/td>\n<td style=\"width: 107px\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a07<\/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 SecondLab\r\n{\r\n\tpublic static void main (String[] args) throws java.lang.Exception\r\n\t{\r\n\t\tint a, b, c, average;\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\ta = input.nextInt();\r\n\t\tb = input.nextInt();\r\n\t\tc = input.nextInt();\r\n\t\t\r\n\t\tif((a &gt; b &amp;&amp; b &gt; c)||(c &gt; b &amp;&amp; b &gt; a))\r\n\t\t\taverage = b;\r\n\t\telse if ((b &gt; a &amp;&amp; a &gt; c)||(c &gt; a &amp;&amp; a &gt; b ))\r\n\t\t\taverage = a;\r\n\t\telse\r\n\t\t\taverage = c;\r\n\t\tSystem.out.println(average); \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\/RBdkq0\">Ideone<\/a>.<\/p>\n<h3><strong>\u041f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f<\/strong><\/h3>\n<p>\u0412 \u043f\u0435\u0440\u0432\u043e\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u0438\u00a0<span class=\"lang:java decode:true  crayon-inline \">if((a &gt; b &amp;&amp; b &gt; c)||(c &gt; b &amp;&amp; b &gt; a))<\/span>\u00a0, \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043e\u0431\u0430 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u043b\u044e\u0431\u043e\u0433\u043e \u0438\u0437 \u043d\u0438\u0445 \u0441\u0440\u0435\u0434\u043d\u0438\u043c \u0447\u0438\u0441\u043b\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0432\u0442\u043e\u0440\u043e\u0435 \u0447\u0438\u0441\u043b\u043e. \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u0438\u00a0<span class=\"lang:java decode:true  crayon-inline \">else if ((b &gt; a &amp;&amp; a &gt; c)||(c &gt; a &amp;&amp; a &gt; b ))<\/span>\u00a0, \u043f\u0440\u043e\u0434\u0435\u043b\u044b\u0432\u0430\u0435\u043c \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a\u0443\u044e \u0436\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e, \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0436\u0435 \u0441 \u043f\u0435\u0440\u0432\u044b\u043c \u0447\u0438\u0441\u043b\u043e\u043c. \u0415\u0441\u043b\u0438 \u0436\u0435 \u0434\u0432\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f, \u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u043a\u043e\u0432, \u0447\u0442\u043e \u0441\u0440\u0435\u0434\u043d\u0438\u043c \u0447\u0438\u0441\u043b\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0442\u0440\u0435\u0442\u044c\u0435 \u0447\u0438\u0441\u043b\u043e.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u0414\u0430\u043d\u043e \u0442\u0440\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0447\u0438\u0441\u043b\u0430 [latex]a[\/latex],\u00a0[latex]b[\/latex],\u00a0[latex]c[\/latex]. \u0412\u044b\u0432\u0435\u0441\u0442\u0438 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0438\u0437 \u043d\u0438\u0445. \u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0430 e-olymp. \u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0427\u0438\u0441\u043b\u0430\u00a0 [latex]a[\/latex],\u00a0[latex]b[\/latex],\u00a0[latex]c[\/latex] &#8212; \u0446\u0435\u043b\u044b\u0435 \u0438 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e \u043d\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u044e\u0442 1000. \u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e &#8212; \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0437\u0430\u0434\u0430\u0447\u0443. \u0422\u0435\u0441\u0442\u044b \u00a0\u2116 \u00a0 \u00a0 \u00a0 \u00a0 a \u00a0 \u00a0 \u00a0 \u00a0 b \u00a0 \u00a0 \u00a0 \u00a0 \u00a0c \u00a0 \u00a0 \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u00a0 &hellip; <a href=\"https:\/\/java.mazurok.com\/?p=1978\" 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":[3],"tags":[218,216,201,92,217],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/1978"}],"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=1978"}],"version-history":[{"count":8,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/1978\/revisions"}],"predecessor-version":[{"id":2238,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/1978\/revisions\/2238"}],"wp:attachment":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1978"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1978"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1978"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}