{"id":3643,"date":"2018-09-23T11:58:44","date_gmt":"2018-09-23T08:58:44","guid":{"rendered":"http:\/\/java.mazurok.com\/?p=3643"},"modified":"2018-11-19T21:25:38","modified_gmt":"2018-11-19T18:25:38","slug":"e-olymp-542-%d0%bf%d0%be%d1%81%d1%82%d0%b0%d0%b2%d0%ba%d0%b0-%d1%81%d0%be%d0%b4%d0%be%d0%b2%d0%be%d0%b9-%d0%b2%d0%be%d0%b4%d1%8b","status":"publish","type":"post","link":"https:\/\/java.mazurok.com\/?p=3643","title":{"rendered":"e-olymp 542. \u041f\u043e\u0441\u0442\u0430\u0432\u043a\u0430 \u0441\u043e\u0434\u043e\u0432\u043e\u0439 \u0432\u043e\u0434\u044b"},"content":{"rendered":"<h1>\u0417\u0430\u0434\u0430\u0447\u0430<\/h1>\n<p>\u0422\u0438\u043c \u0443\u0436\u0430\u0441\u043d\u043e \u043b\u044e\u0431\u0438\u0442 \u0441\u043e\u0434\u043e\u0432\u0443\u044e \u0432\u043e\u0434\u0443, \u0438\u043d\u043e\u0433\u0434\u0430 \u043e\u043d \u0435\u044e \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u043f\u0438\u0442\u044c\u0441\u044f. \u0415\u0449\u0435 \u0431\u043e\u043b\u0435\u0435 \u0434\u043e\u0441\u0430\u0434\u043d\u044b\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u0442 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u0443 \u043d\u0435\u0433\u043e \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043d\u0435\u0442 \u0434\u0435\u043d\u0435\u0433. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u043b\u0435\u0433\u0430\u043b\u044c\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0438\u0445 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0434\u0430\u0436\u0430 \u043f\u0443\u0441\u0442\u044b\u0445 \u0431\u0443\u0442\u044b\u043b\u043e\u043a \u0438\u0437-\u043f\u043e\u0434 \u0441\u043e\u0434\u044b. \u0418\u043d\u043e\u0433\u0434\u0430 \u0432 \u0434\u043e\u0431\u0430\u0432\u043e\u043a \u043a \u0435\u0433\u043e \u043b\u0438\u0447\u043d\u043e \u0432\u044b\u043f\u0438\u0442\u044b\u043c \u0431\u0443\u0442\u044b\u043b\u043a\u0430\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0422\u0438\u043c \u0438\u043d\u043e\u0433\u0434\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u0443\u043b\u0438\u0446\u0435. \u041e\u0434\u043d\u0430\u0436\u0434\u044b \u0422\u0438\u043c\u0430 \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043c\u0443\u0447\u0438\u043b\u0430 \u0436\u0430\u0436\u0434\u0430, \u0447\u0442\u043e \u043e\u043d \u0440\u0435\u0448\u0438\u043b \u043f\u0438\u0442\u044c \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440 \u043f\u043e\u043a\u0430 \u043c\u043e\u0433 \u0441\u0435\u0431\u0435 \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u044c.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/java.mazurok.com\/wp-content\/uploads\/1262607161-e1513098751523-300x204.jpg\" alt=\"\" width=\"300\" height=\"204\" class=\"alignnone size-medium wp-image-3651\" \/><\/p>\n<h1>\u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h1>\n<p>\u0422\u0440\u0438 \u0446\u0435\u043b\u044b\u0445 \u043d\u0435\u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u043b\u0430 $e$, $f$, $c$, \u0433\u0434\u0435 $e$ $\\left(e &lt; 1000\\right)$ \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0443\u0441\u0442\u044b\u0445 \u0431\u0443\u0442\u044b\u043b\u043e\u043a, \u0438\u043c\u0435\u044e\u0449\u0438\u0445\u0441\u044f \u0443 \u0422\u0438\u043c\u0430 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0434\u043d\u044f, $f$ $\\left(f &lt; 1000\\right)$ \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0443\u0441\u0442\u044b\u0445 \u0431\u0443\u0442\u044b\u043b\u043e\u043a, \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u0434\u043d\u044f, \u0438 $c$ $\\left(1 &lt; c &lt; 2000\\right)$ \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0443\u0441\u0442\u044b\u0445 \u0431\u0443\u0442\u044b\u043b\u043e\u043a, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0434\u043b\u044f \u043f\u043e\u043a\u0443\u043f\u043a\u0438 \u043d\u043e\u0432\u043e\u0439 \u0431\u0443\u0442\u044b\u043b\u043a\u0438.<\/p>\n<h1>\u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h1>\n<p>\u0421\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u0443\u0442\u044b\u043b\u043e\u043a \u0441\u043e\u0434\u043e\u0432\u043e\u0439 \u0432\u043e\u0434\u044b \u0441\u043c\u043e\u0433 \u0432\u044b\u043f\u0438\u0442\u044c \u0422\u0438\u043c, \u043a\u043e\u0433\u0434\u0430 \u0435\u0433\u043e \u0437\u0430\u043c\u0443\u0447\u0438\u043b\u0430 \u0436\u0430\u0436\u0434\u0430?<\/p>\n<h1>\u0422\u0435\u0441\u0442\u044b<\/h1>\n<table>\n<tbody>\n<tr>\n<td><strong>\u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/strong><\/td>\n<td><strong>\u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/strong><\/td>\n<\/tr>\n<tr>\n<td>[latex]9[\/latex] [latex]0[\/latex] [latex]3[\/latex] <\/td>\n<td>[latex]4[\/latex]<\/td>\n<\/tr>\n<tr>\n<td>[latex]5[\/latex] [latex]5[\/latex] [latex]2[\/latex] <\/td>\n<td> [latex]9[\/latex]<\/td>\n<\/tr>\n<tr>\n<td>[latex]0[\/latex] [latex]8[\/latex] [latex]4[\/latex] <\/td>\n<td>[latex]2[\/latex]<\/td>\n<\/tr>\n<tr>\n<td>[latex]22[\/latex] [latex]0[\/latex] [latex]4[\/latex] <\/td>\n<td>[latex]7[\/latex]<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1>\u041a\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/h1>\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 e, f, c;\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\te = in.nextInt();\r\n\t\tf = in.nextInt();\r\n\t\tc = in.nextInt();\r\n\t\tSystem.out.print((int)((e + f)\/(c - 1 + 0.0001)));\r\n\t\t\r\n\t}\r\n}<\/pre>\n<h1>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/h1>\n<p>\u041c\u043e\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0443 \u0422\u0438\u043c\u0430 \u0438\u043c\u0435\u0435\u0442\u0441\u044f $e+f$ \u043f\u0443\u0441\u0442\u044b\u0445 \u0431\u0443\u0442\u044b\u043b\u043e\u043a. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0443 \u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u0445\u043e\u0442\u044f \u0431\u044b $c$ \u0431\u0443\u0442\u044b\u043b\u043e\u043a, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0434\u043b\u044f \u043f\u043e\u043a\u0443\u043f\u043a\u0438 \u043d\u043e\u0432\u043e\u0439, \u0422\u0438\u043c \u0438\u0434\u0435\u0442 \u0438 \u043c\u0435\u043d\u044f\u0435\u0442 \u0438\u0445 \u043d\u0430 \u043e\u0434\u043d\u0443 \u043f\u043e\u043b\u043d\u0443\u044e \u0431\u0443\u0442\u044b\u043b\u043a\u0443. \u0417\u0430\u0442\u0435\u043c \u0432\u044b\u043f\u0438\u0432\u0430\u0435\u0442 \u0435\u0451, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0443\u0441\u0442\u044b\u0445 \u0443 \u043d\u0435\u0433\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442\u0441\u044f \u043d\u0430 $c &#8212; 1$. \u0422\u043e \u0435\u0441\u0442\u044c \u0437\u0430 $e + f$ \u043f\u0443\u0441\u0442\u044b\u0445 \u0431\u0443\u0442\u044b\u043b\u043e\u043a \u043e\u043d \u0441\u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u0438\u0442\u044c $\\frac{e + f}{c &#8212; 1}$ \u0431\u0443\u0442\u044b\u043b\u043e\u043a \u0441\u043e\u0434\u043e\u0432\u043e\u0439 \u0432\u043e\u0434\u044b. \u041d\u0430\u043c \u0442\u0430\u043a\u0436\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a $c &#8212; 1$ \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0443\u044e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443 $a = 0.0001$, \u0447\u0442\u043e\u0431\u044b \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0431\u0443\u0442\u044b\u043b\u043e\u043a \u043a\u0440\u0430\u0442\u043d\u043e $c &#8212; 1$, \u0422\u0438\u043c\u0443 \u043d\u0435\u043b\u044c\u0437\u044f \u0431\u044b\u043b\u043e \u0432\u0437\u044f\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0431\u0443\u0442\u044b\u043b\u043a\u0443 \u0441 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u044e\u0449\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043f\u0443\u0441\u0442\u044b\u0445 \u0431\u0443\u0442\u044b\u043b\u043e\u043a \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u043f\u0438\u0442\u044c \u043d\u0430 \u043e\u0434\u043d\u0443 \u0431\u0443\u0442\u044b\u043b\u043a\u0443 \u043c\u0435\u043d\u044c\u0448\u0435. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u044b\u0432\u043e\u0434\u0438\u043c \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0431\u0443\u0442\u044b\u043b\u043e\u043a \u0441\u043e\u0434\u043e\u0432\u043e\u0439 \u0432\u043e\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0422\u0438\u043c \u0441\u043c\u043e\u0433 \u0432\u044b\u043f\u0438\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u0435\u0433\u043e \u0437\u0430\u043c\u0443\u0447\u0438\u043b\u0430 \u0436\u0430\u0436\u0434\u0430.<\/p>\n<h1>\u0421\u0441\u044b\u043b\u043a\u0438<\/h1>\n<p>\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 <a href=\"https:\/\/www.e-olymp.com\/ru\/problems\/542\" rel=\"noopener\" target=\"_blank\">e-olymp<\/a><\/p>\n<p>\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 <a href=\"https:\/\/ideone.com\/y2te60\" rel=\"noopener\" target=\"_blank\">ideone<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u0422\u0438\u043c \u0443\u0436\u0430\u0441\u043d\u043e \u043b\u044e\u0431\u0438\u0442 \u0441\u043e\u0434\u043e\u0432\u0443\u044e \u0432\u043e\u0434\u0443, \u0438\u043d\u043e\u0433\u0434\u0430 \u043e\u043d \u0435\u044e \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u043f\u0438\u0442\u044c\u0441\u044f. \u0415\u0449\u0435 \u0431\u043e\u043b\u0435\u0435 \u0434\u043e\u0441\u0430\u0434\u043d\u044b\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u0442 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u0443 \u043d\u0435\u0433\u043e \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043d\u0435\u0442 \u0434\u0435\u043d\u0435\u0433. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u043b\u0435\u0433\u0430\u043b\u044c\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0438\u0445 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0434\u0430\u0436\u0430 \u043f\u0443\u0441\u0442\u044b\u0445 \u0431\u0443\u0442\u044b\u043b\u043e\u043a \u0438\u0437-\u043f\u043e\u0434 \u0441\u043e\u0434\u044b. \u0418\u043d\u043e\u0433\u0434\u0430 \u0432 \u0434\u043e\u0431\u0430\u0432\u043e\u043a \u043a \u0435\u0433\u043e \u043b\u0438\u0447\u043d\u043e \u0432\u044b\u043f\u0438\u0442\u044b\u043c \u0431\u0443\u0442\u044b\u043b\u043a\u0430\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0422\u0438\u043c \u0438\u043d\u043e\u0433\u0434\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u0443\u043b\u0438\u0446\u0435. \u041e\u0434\u043d\u0430\u0436\u0434\u044b \u0422\u0438\u043c\u0430 &hellip; <a href=\"https:\/\/java.mazurok.com\/?p=3643\" class=\"more-link\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":124,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[378,379,380,381,382,383,147,384],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/3643"}],"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\/124"}],"replies":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3643"}],"version-history":[{"count":5,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/3643\/revisions"}],"predecessor-version":[{"id":3656,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/3643\/revisions\/3656"}],"wp:attachment":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3643"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3643"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3643"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}