{"id":3423,"date":"2017-12-13T09:11:05","date_gmt":"2017-12-13T06:11:05","guid":{"rendered":"http:\/\/java.mazurok.com\/?p=3423"},"modified":"2017-12-14T01:02:42","modified_gmt":"2017-12-13T22:02:42","slug":"e-olymp-2-%d1%86%d0%b8%d1%84%d1%80%d1%8b","status":"publish","type":"post","link":"https:\/\/java.mazurok.com\/?p=3423","title":{"rendered":"e-olymp 2. \u0426\u0438\u0444\u0440\u044b"},"content":{"rendered":"<h1>\u0417\u0430\u0434\u0430\u0447\u0430<\/h1>\n<p>\u0412\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0446\u0438\u0444\u0440 \u0446\u0435\u043b\u043e\u0433\u043e \u043d\u0435\u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 $latex n$.<\/p>\n<h1>\u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h1>\n<p>\u041d\u0435\u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e [latex]n[\/latex] [latex](0&lt;=n&lt;=2*10^9)[\/latex]. <\/p>\n<h1>\u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h1>\n<p>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0446\u0438\u0444\u0440 \u0432 \u0447\u0438\u0441\u043b\u0435 $latex n$.<\/p>\n<h1>\u0422\u0435\u0441\u0442\u044b<\/h1>\n<table>\n<tbody>\n<tr>\n<td>n<\/td>\n<td>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0446\u0438\u0444\u0440<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>327<\/td>\n<td>3<\/td>\n<\/tr>\n<tr>\n<td>1024<\/td>\n<td>4<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<pre class=\"lang:java decode:true \">\r\nimport java.util.*;\r\nimport java.lang.*;\r\nimport java.io.*;\r\n \r\nclass Ideone\r\n{\r\n  public static void main (String[] args) throws java.lang.Exception\r\n  {\r\n    int x=1, n;\r\n    Scanner in = new Scanner(System.in);\r\n    n = in.nextInt();\r\n    while ((n\/=10) &gt; 0)\r\n    {\r\n      x++;\r\n    }\r\n    System.out.println(x);\r\n  }\r\n}\r\n<\/pre>\n<h1>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/h1>\n<p>\u041e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e  <span class=\"top-set:false lang:java decode:true  crayon-inline \">x<\/span>  \u0434\u043b\u044f \u043f\u043e\u0434\u0441\u0447\u0435\u0442\u0430 \u0446\u0438\u0444\u0440 \u0432 \u0447\u0438\u0441\u043b\u0435 \u0438 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u043c \u0435\u0439 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 1, \u0432\u0432\u043e\u0434\u0438\u043c  <span class=\"lang:java decode:true  crayon-inline \">n<\/span> . \u0414\u0430\u043b\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0446\u0438\u043a\u043b  <span class=\"lang:java decode:true  crayon-inline \">while<\/span> , \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044f \u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0447\u0438\u0441\u043b\u0430  <span class=\"lang:java decode:true  crayon-inline \">n<\/span>  \u043d\u0430 10 (\u0442\u0430\u043a \u043a\u0430\u043a \u0442\u0438\u043f \u0447\u0438\u0441\u043b\u0430  <span class=\"lang:java decode:true  crayon-inline \">int<\/span> ). \u042d\u0442\u043e \u00ab\u043e\u0442\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442\u00bb \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0446\u0438\u0444\u0440\u0443 \u0432 \u0447\u0438\u0441\u043b\u0435. \u041f\u043e\u043a\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438\u0441\u0442\u0438\u043d\u043d\u044b\u0439, \u0438\u043d\u043a\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u043c  <span class=\"lang:java decode:true  crayon-inline \">x<\/span>  \u043d\u0430 1. <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043d\u0430 <a href=\"https:\/\/ideone.com\/ikCBMX\">ideone<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u0412\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0446\u0438\u0444\u0440 \u0446\u0435\u043b\u043e\u0433\u043e \u043d\u0435\u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 $latex n$. \u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u041d\u0435\u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e [latex]n[\/latex] [latex](0&lt;=n&lt;=2*10^9)[\/latex]. \u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0446\u0438\u0444\u0440 \u0432 \u0447\u0438\u0441\u043b\u0435 $latex n$. \u0422\u0435\u0441\u0442\u044b n \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0446\u0438\u0444\u0440 3 1 327 3 1024 4 import java.util.*; import java.lang.*; import java.io.*; class Ideone { public static void main (String[] args) throws java.lang.Exception { int x=1, n; &hellip; <a href=\"https:\/\/java.mazurok.com\/?p=3423\" class=\"more-link\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":100,"featured_media":3427,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[338,337,12,317,102],"jetpack_featured_media_url":"https:\/\/java.mazurok.com\/wp-content\/uploads\/1-0-9.jpg_640x6401.jpg","_links":{"self":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/3423"}],"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\/100"}],"replies":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3423"}],"version-history":[{"count":4,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/3423\/revisions"}],"predecessor-version":[{"id":3434,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/3423\/revisions\/3434"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/media\/3427"}],"wp:attachment":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3423"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3423"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3423"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}