{"id":3632,"date":"2018-09-19T20:42:38","date_gmt":"2018-09-19T17:42:38","guid":{"rendered":"http:\/\/java.mazurok.com\/?p=3632"},"modified":"2018-11-19T21:23:26","modified_gmt":"2018-11-19T18:23:26","slug":"e-olymp-7460-%d0%bf%d0%be%d0%b5%d0%b7%d0%b4%d0%ba%d0%b0-%d0%bd%d0%b0-%d1%8d%d0%ba%d1%81%d0%ba%d1%83%d1%80%d1%81%d0%b8%d1%8e","status":"publish","type":"post","link":"https:\/\/java.mazurok.com\/?p=3632","title":{"rendered":"e-olymp 7460. \u041f\u043e\u0435\u0437\u0434\u043a\u0430 \u043d\u0430 \u044d\u043a\u0441\u043a\u0443\u0440\u0441\u0438\u044e"},"content":{"rendered":"<h1>\u0417\u0430\u0434\u0430\u0447\u0430<\/h1>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3637\" src=\"http:\/\/java.mazurok.com\/wp-content\/uploads\/11506759-large1-300x199.jpg\" alt=\"\" width=\"300\" height=\"199\" srcset=\"https:\/\/java.mazurok.com\/wp-content\/uploads\/11506759-large1-300x199.jpg 300w, https:\/\/java.mazurok.com\/wp-content\/uploads\/11506759-large1.jpg 376w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>\u0423\u0447\u0435\u043d\u0438\u043a\u0438 10-\u0411 \u043a\u043b\u0430\u0441\u0441\u0430 \u043d\u0430 \u043e\u0441\u0435\u043d\u043d\u0438\u0435 \u043a\u0430\u043d\u0438\u043a\u0443\u043b\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u043e\u0435\u0445\u0430\u0442\u044c \u043d\u0430 \u044d\u043a\u0441\u043a\u0443\u0440\u0441\u0438\u044e \u0432 \u0441\u0442\u043e\u043b\u0438\u0446\u0443. \u0417\u043d\u0430\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0430\u043b\u044c\u0447\u0438\u043a\u043e\u0432 $n$ \u0438 \u0434\u0435\u0432\u043e\u0447\u0435\u043a $m$ , \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u043e\u043c\u043d\u0430\u0442 \u0432 \u043e\u0442\u0435\u043b\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u043a\u043e\u043c\u043d\u0430\u0442\u044b \u043d\u0430 $k$ \u043c\u0435\u0441\u0442 \u043a\u0430\u0436\u0434\u0430\u044f, \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u0447\u0442\u043e \u043c\u0430\u043b\u044c\u0447\u0438\u043a\u043e\u0432 \u0438 \u0434\u0435\u0432\u043e\u0447\u0435\u043a \u043f\u043e\u0441\u0435\u043b\u044f\u0442\u044c \u0432\u043c\u0435\u0441\u0442\u0435 \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043e.<\/p>\n<h2>\u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h2>\n<p>\u0412 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u0442\u0440\u0438 \u0447\u0438\u0441\u043b\u0430\u00a0$n,\u00a0m,\u00a0k \\: (n, m, k\u00a0\\leq\u00a0100).$<\/p>\n<h2>\u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h2>\n<p>\u0412\u044b\u0432\u0435\u0441\u0442\u0438 \u043e\u0434\u043d\u043e \u0447\u0438\u0441\u043b\u043e &#8212; \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u043c\u043d\u0430\u0442, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0431\u0440\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u0442\u0435\u043b\u0435.<\/p>\n<h2>\u0422\u0435\u0441\u0442\u044b<\/h2>\n<table style=\"height: 335px\">\n<tbody>\n<tr style=\"height: 22px\">\n<th style=\"text-align: center;height: 22px;width: 135px\">\u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/th>\n<th style=\"text-align: center;height: 22px;width: 148px\">\u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/th>\n<\/tr>\n<tr style=\"height: 44px\">\n<td style=\"text-align: center;height: 44px;width: 135px\">6 12 3<\/td>\n<td style=\"text-align: center;height: 44px;width: 148px\">6<\/td>\n<\/tr>\n<tr style=\"height: 44px\">\n<td style=\"text-align: center;height: 44px;width: 135px\">100 100 100<\/td>\n<td style=\"text-align: center;height: 44px;width: 148px\">2<\/td>\n<\/tr>\n<tr style=\"height: 49px\">\n<td style=\"text-align: center;height: 49px;width: 135px\">0 0 1<\/td>\n<td style=\"text-align: center;height: 49px;width: 148px\">0<\/td>\n<\/tr>\n<tr style=\"height: 44px\">\n<td style=\"text-align: center;height: 44px;width: 135px\">37 34 42<\/td>\n<td style=\"text-align: center;height: 44px;width: 148px\">2<\/td>\n<\/tr>\n<tr style=\"height: 44px\">\n<td style=\"text-align: center;height: 44px;width: 135px\">51 44 22<\/td>\n<td style=\"text-align: center;height: 44px;width: 148px\">5<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>\u041a\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/h2>\n<pre class=\"lang:java decode:true\" title=\"e-olymp-7460\">import java.util.Scanner;\r\nimport java.lang.Math; \r\n \r\npublic class Main {\r\n\tpublic static void main(String[] args) {\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tdouble n, m, k;\r\n\t\tn = sc.nextInt();\r\n\t\tm = sc.nextInt();\r\n\t\tk = sc.nextInt();\r\n\t\tSystem.out.print((int)(Math.ceil(n \/ k) + Math.ceil(m \/ k)));\r\n\t}\r\n}<\/pre>\n<h2>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/h2>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0434\u0435\u0432\u043e\u0447\u0435\u043a \u0441 \u043c\u0430\u043b\u044c\u0447\u0438\u043a\u0430\u043c\u0438 \u0437\u0430\u0441\u0435\u043b\u044f\u0442\u044c \u0432\u043c\u0435\u0441\u0442\u0435 \u043d\u0435\u043b\u044c\u0437\u044f, \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u043c\u043d\u0430\u0442, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0434\u043b\u044f \u0437\u0430\u0441\u0435\u043b\u0435\u043d\u0438\u044f \u043c\u0430\u043b\u044c\u0447\u0438\u043a\u0430\u043c\u0438 \u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e &#8212; \u0434\u0435\u0432\u043e\u0447\u043a\u0430\u043c\u0438. \u0421\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u043c\u043d\u0430\u0442 \u0434\u043b\u044f \u043c\u0430\u043b\u044c\u0447\u0438\u043a\u043e\u0432 \u0441 \u0442\u0430\u043a\u043e\u0432\u044b\u043c \u0443 \u0434\u0435\u0432\u043e\u0447\u0435\u043a.<\/p>\n<h2>\u0421\u0441\u044b\u043b\u043a\u0438<\/h2>\n<p>\u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0430\u00a0<a href=\"https:\/\/www.e-olymp.com\/ru\/problems\/7460\" target=\"_blank\" rel=\"noopener\">e-olymp<\/a><br \/>\n\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 <a href=\"https:\/\/ideone.com\/jd2kMb\" target=\"_blank\" rel=\"noopener\">ideone<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u0423\u0447\u0435\u043d\u0438\u043a\u0438 10-\u0411 \u043a\u043b\u0430\u0441\u0441\u0430 \u043d\u0430 \u043e\u0441\u0435\u043d\u043d\u0438\u0435 \u043a\u0430\u043d\u0438\u043a\u0443\u043b\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u043e\u0435\u0445\u0430\u0442\u044c \u043d\u0430 \u044d\u043a\u0441\u043a\u0443\u0440\u0441\u0438\u044e \u0432 \u0441\u0442\u043e\u043b\u0438\u0446\u0443. \u0417\u043d\u0430\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0430\u043b\u044c\u0447\u0438\u043a\u043e\u0432 $n$ \u0438 \u0434\u0435\u0432\u043e\u0447\u0435\u043a $m$ , \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u043e\u043c\u043d\u0430\u0442 \u0432 \u043e\u0442\u0435\u043b\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u043a\u043e\u043c\u043d\u0430\u0442\u044b \u043d\u0430 $k$ \u043c\u0435\u0441\u0442 \u043a\u0430\u0436\u0434\u0430\u044f, \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u0447\u0442\u043e \u043c\u0430\u043b\u044c\u0447\u0438\u043a\u043e\u0432 \u0438 \u0434\u0435\u0432\u043e\u0447\u0435\u043a \u043f\u043e\u0441\u0435\u043b\u044f\u0442\u044c \u0432\u043c\u0435\u0441\u0442\u0435 \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043e. \u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0412 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u0442\u0440\u0438 \u0447\u0438\u0441\u043b\u0430\u00a0$n,\u00a0m,\u00a0k \\: (n, &hellip; <a href=\"https:\/\/java.mazurok.com\/?p=3632\" class=\"more-link\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":126,"featured_media":3637,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[372,371,373],"jetpack_featured_media_url":"https:\/\/java.mazurok.com\/wp-content\/uploads\/11506759-large1.jpg","_links":{"self":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/3632"}],"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\/126"}],"replies":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3632"}],"version-history":[{"count":7,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/3632\/revisions"}],"predecessor-version":[{"id":4784,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/3632\/revisions\/4784"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/media\/3637"}],"wp:attachment":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3632"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3632"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3632"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}