{"id":4974,"date":"2020-09-09T22:32:18","date_gmt":"2020-09-09T19:32:18","guid":{"rendered":"http:\/\/java.mazurok.com\/?p=4974"},"modified":"2020-09-13T21:15:52","modified_gmt":"2020-09-13T18:15:52","slug":"e-olymp-1206-f91","status":"publish","type":"post","link":"https:\/\/java.mazurok.com\/?p=4974","title":{"rendered":"e-olymp 1206. f91"},"content":{"rendered":"<h1>\u0417\u0430\u0434\u0430\u0447\u0430<\/h1>\n<p>\u041c\u0430\u043a\u041a\u0430\u0440\u0442\u0438 &#8212; \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u043a \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u044b\u0445 \u043d\u0430\u0443\u043a. \u0412 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0441\u0432\u043e\u0438\u0445 \u0440\u0430\u0431\u043e\u0442 \u043e\u043d \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e $f_{91}$, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430 \u0434\u043b\u044f \u0432\u0441\u044f\u043a\u043e\u0433\u043e \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 $n$ \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p>\u0415\u0441\u043b\u0438 $n\\leqslant100$, \u0442\u043e $f_{91}\\left(n\\right) = f_{91}\\left(f_{91}\\left(n+11\\right)\\right)$;<\/p>\n<p>\u0415\u0441\u043b\u0438 $n\\geqslant101$, \u0442\u043e $f_{91}\\left(n\\right) = n-10$.<\/p>\n<h2><strong>\u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/strong><\/h2>\n<p>\u041d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e $n$, \u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0435\u0435 $1000000$.<\/p>\n<h2><strong>\u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/strong><\/h2>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 $f_{91}\\left(n\\right)$.<\/p>\n<h1>\u0422\u0435\u0441\u0442\u044b<\/h1>\n<table style=\"height: 102px\" width=\"385\">\n<tbody>\n<tr>\n<td><span class=\"hljs-tag\">\u2116<\/span><\/td>\n<td>\u0412\u0425\u041e\u0414\u041d\u042b\u0415 \u0414\u0410\u041d\u041d\u042b\u0415<\/td>\n<td>\u0412\u042b\u0425\u041e\u0414\u041d\u042b\u0415 \u0414\u0410\u041d\u041d\u042b\u0415<\/td>\n<\/tr>\n<tr>\n<td>\u00a01<\/td>\n<td>5<\/td>\n<td>91<\/td>\n<\/tr>\n<tr>\n<td>\u00a02<\/td>\n<td>27<\/td>\n<td>91<\/td>\n<\/tr>\n<tr>\n<td>\u00a03<\/td>\n<td>91<\/td>\n<td>91<\/td>\n<\/tr>\n<tr>\n<td>\u00a04<\/td>\n<td>100<\/td>\n<td>91<\/td>\n<\/tr>\n<tr>\n<td>\u00a05<\/td>\n<td>102<\/td>\n<td>92<\/td>\n<\/tr>\n<tr>\n<td>\u00a06<\/td>\n<td>180<\/td>\n<td>170<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1>\u041a\u043e\u0434<\/h1>\n<pre class=\"lang:java decode:true \">class Main{\r\n\tpublic static long func(long n){\r\n\t\tif(n &lt;= 100){\r\n\t\t\treturn 91;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn n - 10;\r\n\t\t}\r\n\t}\r\n\tpublic static void main (String[] args){\r\n\t\tjava.util.Scanner in = new java.util.Scanner(System.in);\r\n\t\tlong num = in.nextInt();\r\n\t\tSystem.out.println(func(num));\r\n\t}\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<h1>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/h1>\n<p>\u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e $f_{91}\\left(n\\right)$ \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f $n$ \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0430\u043c \u0440\u0430\u0437\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0430 \u0438\u043c\u0435\u0435\u043d\u043e:<br \/>\n\u0435\u0441\u043b\u0438 $n\\leqslant100$, \u0442\u043e $f_{91}\\left(n\\right) = f_{91}\\left(f_{91}\\left(n+11\\right)\\right)$;<br \/>\n\u0435\u0441\u043b\u0438 $n\\geqslant101$, \u0442\u043e $f_{91}\\left(n\\right) = n-10$.<br \/>\n\u0422\u0430\u043a \u0436\u0435, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430\u043a\u043e\u043d\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 $n\\leqslant100$ \u0444\u0443\u043d\u043a\u0446\u0438\u044f $f_{91}\\left(n\\right)$ \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0434\u0430\u0432\u0442\u044c $91$, \u0437\u0430\u043c\u0435\u0442\u0438\u0432 \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u0443\u044e, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043a\u0440\u0430\u0441\u0438\u0432\u0443\u044e \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u0449\u0438\u0435 \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435:<br \/>\n$f_{91}\\left(n\\right) = \\begin{cases} 91, &amp; n\\leqslant100;\\\\\\ n-10, &amp; n\\geqslant101; \\end{cases}$<\/p>\n<h1>\u0421\u0441\u044b\u043b\u043a\u0438<\/h1>\n<ul>\n<li>\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\/1206\">e-olymp<\/a><\/li>\n<li>\u041a\u043e\u0434 \u043d\u0430 <a href=\"https:\/\/ideone.com\/NbVkV2\">Ideone<\/a><\/li>\n<li>\u0417\u0430\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430\u00a0<a href=\"https:\/\/www.e-olymp.com\/ru\/submissions\/7303719\">e-olymp\u00a0<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u041c\u0430\u043a\u041a\u0430\u0440\u0442\u0438 &#8212; \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u043a \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u044b\u0445 \u043d\u0430\u0443\u043a. \u0412 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0441\u0432\u043e\u0438\u0445 \u0440\u0430\u0431\u043e\u0442 \u043e\u043d \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e $f_{91}$, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430 \u0434\u043b\u044f \u0432\u0441\u044f\u043a\u043e\u0433\u043e \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 $n$ \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: \u0415\u0441\u043b\u0438 $n\\leqslant100$, \u0442\u043e $f_{91}\\left(n\\right) = f_{91}\\left(f_{91}\\left(n+11\\right)\\right)$; \u0415\u0441\u043b\u0438 $n\\geqslant101$, \u0442\u043e $f_{91}\\left(n\\right) = n-10$. \u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u041d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e $n$, \u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0435\u0435 $1000000$. \u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 $f_{91}\\left(n\\right)$. \u0422\u0435\u0441\u0442\u044b \u2116 \u0412\u0425\u041e\u0414\u041d\u042b\u0415 \u0414\u0410\u041d\u041d\u042b\u0415 \u0412\u042b\u0425\u041e\u0414\u041d\u042b\u0415 &hellip; <a href=\"https:\/\/java.mazurok.com\/?p=4974\" class=\"more-link\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":177,"featured_media":4976,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[41,201,92,71],"jetpack_featured_media_url":"https:\/\/java.mazurok.com\/wp-content\/uploads\/f91.jpg","_links":{"self":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/4974"}],"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\/177"}],"replies":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4974"}],"version-history":[{"count":2,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/4974\/revisions"}],"predecessor-version":[{"id":4977,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/4974\/revisions\/4977"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/media\/4976"}],"wp:attachment":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4974"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4974"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4974"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}