{"id":5061,"date":"2020-09-13T14:06:43","date_gmt":"2020-09-13T11:06:43","guid":{"rendered":"http:\/\/java.mazurok.com\/?p=5061"},"modified":"2020-09-13T21:46:21","modified_gmt":"2020-09-13T18:46:21","slug":"e-olymp-8283-%d0%bc%d1%83%d0%b7%d1%8b%d0%ba%d0%b0","status":"publish","type":"post","link":"https:\/\/java.mazurok.com\/?p=5061","title":{"rendered":"e-olymp 8283. \u041c\u0443\u0437\u044b\u043a\u0430"},"content":{"rendered":"<h1>\u0417\u0430\u0434\u0430\u0447\u0430<\/h1>\n<p>\u041c\u0430\u043b\u044b\u0448\u0438 \u0438 \u043c\u0430\u043b\u044b\u0448\u043a\u0438 \u043e\u0447\u0435\u043d\u044c \u043b\u044e\u0431\u0438\u043b\u0438 \u043c\u0443\u0437\u044b\u043a\u0443, \u0430 \u0413\u0443\u0441\u043b\u044f \u0431\u044b\u043b \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u0443\u0437\u044b\u043a\u0430\u043d\u0442. \u0423 \u043d\u0435\u0433\u043e \u0431\u044b\u043b\u0438 \u0440\u0430\u0437\u043d\u044b\u0435 \u043c\u0443\u0437\u044b\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u0438 \u043e\u043d \u0447\u0430\u0441\u0442\u043e \u0438\u0433\u0440\u0430\u043b \u043d\u0430 \u043d\u0438\u0445. \u0418\u0445 \u0431\u044b\u043b\u043e \u043c\u043d\u043e\u0433\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d \u0440\u0430\u0437\u0432\u0435\u0441\u0438\u043b \u0438\u0445 \u043d\u0430 \u0441\u0442\u0435\u043d\u0430\u0445 \u0441\u0432\u043e\u0435\u0439 \u043a\u043e\u043c\u043d\u0430\u0442\u044b. \u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u0440\u0430\u0432\u0430 \u043e\u0442 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0434\u0432\u0435\u0440\u0438 \u0438\u043c\u0435\u043b \u043d\u043e\u043c\u0435\u0440 $1$, \u0434\u0430\u043b\u044c\u0448\u0435 \u043e\u043d\u0438 \u043d\u0443\u043c\u0435\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u043f\u043e \u043a\u0440\u0443\u0433\u0443, \u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0441 \u043d\u043e\u043c\u0435\u0440\u043e\u043c $n$ \u0432\u0438\u0441\u0435\u043b \u0441\u043b\u0435\u0432\u0430 \u043e\u0442 \u044d\u0442\u043e\u0439 \u0434\u0432\u0435\u0440\u0438.<\/p>\n<p>\u041c\u0430\u043b\u044b\u0448\u0438 \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u043e\u0441\u0438\u043b\u0438 \u0435\u0433\u043e \u043d\u0430\u0443\u0447\u0438\u0442\u044c \u0438\u0433\u0440\u0430\u0442\u044c \u043d\u0430 \u043a\u0430\u043a\u043e\u043c-\u043d\u0438\u0431\u0443\u0434\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0435. \u0413\u0443\u0441\u043b\u044f \u043d\u0435 \u043e\u0442\u043a\u0430\u0437\u044b\u0432\u0430\u043b, \u043d\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u043b \u0432\u0437\u044f\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0441 \u043f\u0435\u0440\u0432\u044b\u043c \u043d\u043e\u043c\u0435\u0440\u043e\u043c, \u0430 \u0435\u0441\u043b\u0438 \u0443\u0447\u0435\u043d\u0438\u043a\u0443 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0438\u0433\u0440\u0430\u0442\u044c \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u043c, \u0442\u043e \u043e\u043d \u0432\u044b\u0431\u0438\u0440\u0430\u043b \u0448\u0435\u0441\u0442\u043e\u0439 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u043e \u043a\u0440\u0443\u0433\u0443 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. \u041d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u043b\u0430 \u043d\u043e\u043c\u0435\u0440 \u043f\u043e\u043f\u044b\u0442\u043a\u0438, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0443\u0447\u0435\u043d\u0438\u043a \u043c\u043e\u0433 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0436\u0435\u043b\u0430\u0435\u043c\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0441 \u043d\u043e\u043c\u0435\u0440\u043e\u043c $k$.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 $n = 11$, \u0442\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439: $(1) 2 3 4 5 6 (7) 8 9 10 11 1 (2) 3 4 5 6 7 (8) 9 10 11 1 2 (3) 4 5$ &#8230;, \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u0440\u0438 $k = 3$ \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0441 \u043d\u043e\u043c\u0435\u0440\u043e\u043c $3$ \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441 \u043f\u044f\u0442\u043e\u0439 \u043f\u043e\u043f\u044b\u0442\u043a\u0438.<\/p>\n<h1>\u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h1>\n<p>\u0414\u0432\u0430 \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u043b\u0430 $n$ \u0438 $k$ $(1 \\leqslant k \\leqslant n \\leqslant 100)$.<\/p>\n<h1>\u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h1>\n<p>\u0412\u044b\u0432\u0435\u0441\u0442\u0438 \u043d\u043e\u043c\u0435\u0440 \u043f\u043e\u043f\u044b\u0442\u043a\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 &#171;\u0432\u044b\u043f\u0430\u0434\u0430\u043b&#187; \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0441 \u043d\u043e\u043c\u0435\u0440\u043e\u043c $k$. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u043b\u043e, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0432\u044b\u0432\u0435\u0441\u0442\u0438 $0$.<\/p>\n<h1>\u0422\u0435\u0441\u0442\u044b<\/h1>\n<table style=\"height: 354\" width=\"1311\">\n<tbody>\n<tr>\n<th>\u2116<\/th>\n<th>\u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/th>\n<th>\u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/th>\n<\/tr>\n<tr>\n<th style=\"text-align: center\">1<\/th>\n<td style=\"text-align: center\">11 3<\/td>\n<td style=\"text-align: center\">5<\/td>\n<\/tr>\n<tr>\n<th style=\"text-align: center\">2<\/th>\n<td style=\"text-align: center\">6 2<\/td>\n<td style=\"text-align: center\">0<\/td>\n<\/tr>\n<tr>\n<th style=\"text-align: center\">3<\/th>\n<td style=\"text-align: center\">13 13<\/td>\n<td style=\"text-align: center\">3<\/td>\n<\/tr>\n<tr>\n<th style=\"text-align: center\">4<\/th>\n<td style=\"text-align: center\">9 8<\/td>\n<td style=\"text-align: center\">0<\/td>\n<\/tr>\n<tr>\n<th style=\"text-align: center\">5<\/th>\n<td style=\"text-align: center\">5 5<\/td>\n<td style=\"text-align: center\">5<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1>\u041a\u043e\u0434<\/h1>\n<pre class=\"lang:java decode:true\">\r\nimport java.util.Scanner;\r\n\r\nclass Main {\r\n\tpublic static void main (String[] args) {\r\n\t\tint counter = 1;\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\tint quantity = in.nextInt();\r\n\t\tint instrument = in.nextInt();\r\n\t\tif ((quantity == 6 &amp;&amp; instrument != 1) || (quantity == instrument &amp;&amp; quantity % 2 == 0)) {\r\n\t\t\tSystem.out.print(0);\r\n\t\t} else if (quantity == instrument) {\r\n\t\t\tfor (int num = 1; num % quantity != 0; num += 6) {\r\n\t\t\t\tif (num != 1 &amp;&amp; num % quantity == 1){\r\n\t\t\t\t\tSystem.out.print(0);\r\n\t\t\t\t\tSystem.exit(0);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcounter++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(counter);\r\n\t\t} else {\r\n\t\t\tfor (int num = 1; num % quantity != instrument; num += 6) {\r\n\t\t\t\tif (num != 1 &amp;&amp; num % quantity == 1) {\r\n\t\t\t\t\tSystem.out.print(0);\r\n\t\t\t\t\tSystem.exit(0);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcounter++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(counter);\r\n\t\t}\r\n\t}\r\n}\r\n<\/pre>\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 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0440\u044f\u0434 \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0435\u0434\u0438\u043d\u0438\u0446\u044b \u0438 \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u044f\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 $6$. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441 \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u043c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043d\u043e\u043c\u0435\u0440\u0430 \u043c\u0443\u0437\u044b\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430. \u041e\u0434\u043d\u0430\u043a\u043e \u043b\u043e\u0433\u0438\u043a\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0445. \u0418\u043c\u0435\u0435\u0442\u0441\u044f \u0434\u0432\u0430 \u0441\u043b\u0443\u0447\u0430\u044f:<\/p>\n<ol>\n<li>\u0415\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u0432\u043e\u0434\u0438\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430.<\/li>\n<li>\u0415\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u0432\u043e\u0434\u0438\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0447\u0438\u0441\u043b\u0430.<\/li>\n<\/ol>\n<p>\u0412 <b>\u043f\u0435\u0440\u0432\u043e\u043c<\/b> \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u0434\u0432\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438:<br \/>\n1) \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u0432\u043e\u0434\u0438\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 $6$, \u0442\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043f\u043e\u0434 \u043d\u043e\u043c\u0435\u0440\u043e\u043c $1$, \u0442\u0430\u043a \u043a\u0430\u043a \u0413\u0443\u0441\u043b\u044f \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0447\u0435\u0440\u0435\u0437 $6$ \u0448\u0442\u0443\u043a \u043f\u043e \u043a\u0440\u0443\u0433\u0443;<br \/>\n2) \u0435\u0441\u043b\u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0435 \u0440\u0430\u0432\u043d\u043e $6$ \u0442\u043e \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043d\u043e\u043c\u0435\u0440\u0430 \u043f\u0443\u0442\u0435\u043c \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441 \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u043c, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e: \u0435\u0441\u043b\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0447\u0438\u0441\u043b\u043e \u043f\u0440\u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u043d\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0435 \u0434\u0430\u0435\u0442 \u0432 \u043e\u0441\u0442\u0430\u0442\u043a\u0435 \u0438\u0441\u043a\u043e\u043c\u044b\u0439 \u043d\u043e\u043c\u0435\u0440, \u043c\u044b \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u044f\u0435\u043c $1$ \u043a \u0447\u0438\u0441\u043b\u0443 \u043f\u043e\u043f\u044b\u0442\u043e\u043a, \u0430 \u0447\u0438\u0441\u043b\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u043c \u043d\u0430 $6$, \u0432 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u043d\u0430\u0448\u043b\u0438 \u0447\u0438\u0441\u043b\u043e \u043f\u043e\u043f\u044b\u0442\u043e\u043a.<br \/>\n\u0415\u0449\u0435 \u0437\u0434\u0435\u0441\u044c, \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0438 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u0442\u044c <b>\u043f\u043e\u0434\u0432\u043e\u0434\u043d\u044b\u0439 \u043a\u0430\u043c\u0435\u043d\u044c<\/b>: \u0435\u0441\u043b\u0438 \u043c\u044b \u0443\u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0447\u0438\u0441\u043b\u043e \u043f\u0440\u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u043d\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u0430\u0435\u0442 \u0432 \u043e\u0441\u0442\u0430\u0442\u043a\u0435 $1$, \u043c\u044b \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0435\u043c \u043d\u0430 \u043d\u0443\u0436\u043d\u044b\u0439 \u043d\u0430\u043c \u043d\u043e\u043c\u0435\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430.<\/p>\n<p>\u0412\u043e <b>\u0432\u0442\u043e\u0440\u043e\u043c<\/b> \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u0434\u0432\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438:<br \/>\n1) \u0435\u0441\u043b\u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430\u0446\u0435\u043b\u043e \u043d\u0430 $2$, \u0442\u043e \u043d\u0430\u043c \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0432\u044b\u043f\u0430\u0434\u0435\u0442 \u043d\u0443\u0436\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442;<br \/>\n2) \u0435\u0441\u043b\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0447\u0438\u0441\u043b\u043e \u043f\u0440\u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u043d\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0435 \u0434\u0430\u0435\u0442 \u0432 \u043e\u0441\u0442\u0430\u0442\u043a\u0435 $0$, \u043c\u044b \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u044f\u0435\u043c $1$ \u043a \u0447\u0438\u0441\u043b\u0443 \u043f\u043e\u043f\u044b\u0442\u043e\u043a, \u0430 \u0447\u0438\u0441\u043b\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u043c \u043d\u0430 $6$, \u0432 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430\u0439\u0434\u0435\u043d.<br \/>\n\u0422\u0430\u043a\u0436\u0435 \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u043e <b>\u043f\u043e\u0434\u0432\u043e\u0434\u043d\u044b\u0439 \u043a\u0430\u043c\u0435\u043d\u044c<\/b>, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435.<\/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 <a href=\"https:\/\/www.e-olymp.com\/ru\/problems\/8283\">e-olymp<\/a><\/li>\n<li>\u041a\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430 <a href=\"https:\/\/ideone.com\/bRn8iu\">ideone.com<\/a><\/li>\n<li>\u0417\u0430\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 <a href=\"https:\/\/www.e-olymp.com\/ru\/submissions\/7316664\">e-olymp<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u041c\u0430\u043b\u044b\u0448\u0438 \u0438 \u043c\u0430\u043b\u044b\u0448\u043a\u0438 \u043e\u0447\u0435\u043d\u044c \u043b\u044e\u0431\u0438\u043b\u0438 \u043c\u0443\u0437\u044b\u043a\u0443, \u0430 \u0413\u0443\u0441\u043b\u044f \u0431\u044b\u043b \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u0443\u0437\u044b\u043a\u0430\u043d\u0442. \u0423 \u043d\u0435\u0433\u043e \u0431\u044b\u043b\u0438 \u0440\u0430\u0437\u043d\u044b\u0435 \u043c\u0443\u0437\u044b\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u0438 \u043e\u043d \u0447\u0430\u0441\u0442\u043e \u0438\u0433\u0440\u0430\u043b \u043d\u0430 \u043d\u0438\u0445. \u0418\u0445 \u0431\u044b\u043b\u043e \u043c\u043d\u043e\u0433\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d \u0440\u0430\u0437\u0432\u0435\u0441\u0438\u043b \u0438\u0445 \u043d\u0430 \u0441\u0442\u0435\u043d\u0430\u0445 \u0441\u0432\u043e\u0435\u0439 \u043a\u043e\u043c\u043d\u0430\u0442\u044b. \u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u0440\u0430\u0432\u0430 \u043e\u0442 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0434\u0432\u0435\u0440\u0438 \u0438\u043c\u0435\u043b \u043d\u043e\u043c\u0435\u0440 $1$, \u0434\u0430\u043b\u044c\u0448\u0435 \u043e\u043d\u0438 \u043d\u0443\u043c\u0435\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u043f\u043e \u043a\u0440\u0443\u0433\u0443, \u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0441 \u043d\u043e\u043c\u0435\u0440\u043e\u043c $n$ &hellip; <a href=\"https:\/\/java.mazurok.com\/?p=5061\" class=\"more-link\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":155,"featured_media":5082,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,6],"tags":[452,242,201,230,696,697,10,139,92,231,523,75],"jetpack_featured_media_url":"https:\/\/java.mazurok.com\/wp-content\/uploads\/Vy4UA1m5y101.jpg","_links":{"self":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/5061"}],"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\/155"}],"replies":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5061"}],"version-history":[{"count":2,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/5061\/revisions"}],"predecessor-version":[{"id":5063,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/posts\/5061\/revisions\/5063"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=\/wp\/v2\/media\/5082"}],"wp:attachment":[{"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5061"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5061"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/java.mazurok.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5061"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}