{"id":301152,"date":"2020-04-02T09:00:50","date_gmt":"2020-04-02T09:00:50","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=301152"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=301152","title":{"rendered":"\u0423\u0433\u0430\u0434\u0430\u0439 \u0447\u0438\u0441\u043b\u043e: 1-\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f c# &amp; qbasic"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/495054\/\">\n<p>\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u043d\u0430\u0437\u0430\u0434 \u0447\u0438\u0442\u0430\u044f \u0438\u043d\u043e\u0441\u0442\u0440\u0430\u043d\u043d\u044b\u0439 \u0444\u043e\u0440\u0443\u043c \u0438 \u0443\u0432\u0438\u0434\u0435\u0432 \u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u043d\u0438\u0435: \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 &quot;\u0443\u0433\u0430\u0434\u0430\u0439 \u0447\u0438\u0441\u043b\u043e&quot; \u043f\u043e\u043a\u043e\u0440\u043e\u0447\u0435 \u044f \u043e\u0431\u043e\u0433\u043d\u0430\u043b \u0438\u043d\u043e\u0441\u0442\u0440\u0430\u043d\u0446\u0435\u0432 1-\u043c \u0441\u043e\u0437\u0434\u0430\u0432 1-\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0430 2-\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 <\/p>\n<p>  <\/p>\n<pre><code class=\"vbscript\">1 IF Russia = 0 THEN Russia = 2222: RANDOMIZE TIMER: num = INT(RND * 100) + 1: GOTO 1 ELSE IF Russia &lt;&gt; 0 THEN INPUT n: IF n &lt; num THEN PRINT \u00abMORE\u00bb: GOTO 1 ELSE IF n &gt; num THEN PRINT \u00abless\u00bb: GOTO 1 ELSE IF n = num THEN PRINT \u00abda\u00bb: END ELSE GOTO 1 'DANILIN Russia 9-9-2019 guessnum.bas<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/c0d\/498\/f78\/c0d498f786076a2f573b7f5fd0147353.gif\" alt=\"image\"><a name=\"habracut\"><\/a>  <\/p>\n<pre><code class=\"css\">using System; using System.Text;namespace GURU { class Program { static void Main(string[] args) { Random rand = new Random(); int Russia = 0; int n = 0; int num = 0; dav: if(Russia == 0) {Russia = 2222; num = rand.Next(100)+1; goto dav; }else if (Russia != 0) {Console.Write(&quot;? &quot;); n = Convert.ToInt32(Console.ReadLine());} if (n &lt; num) { Console.WriteLine(\u00abMORE\u00bb); goto dav;}else if (n &gt; num) { Console.WriteLine(\u00abless\u00bb); goto dav;}else if (n == num) {Console.Write(\u00abda\u00bb); Console.ReadKey(); }else goto dav;}}}\/\/ DANILIN Russia 9-9-2019 guessnum.cs<\/code><\/pre>\n<p>  <\/p>\n<p>\u0420\u0430\u0437\u043c\u0435\u0449\u0430\u044e \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044b \u0438 \u043d\u0430\u0434\u0435\u044e\u0441\u044c \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0438 \u0441\u043e\u0447\u0438\u043d\u044f\u0442 \u0441\u0432\u043e\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0441\u0442\u0440\u043e\u0433\u043e 1-\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0435 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f <\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 Milliard.cs \u0443\u0433\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u0447\u0438\u0441\u043b\u043e \u0434\u043e 10^9 \u0437\u0430 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0432\u0440\u0435\u043c\u044f <\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/ideone.com\/IUi0ga\" rel=\"nofollow\">https:\/\/ideone.com\/IUi0ga<\/a><\/p>\n<p>  <\/p>\n<pre><code class=\"css\">       \/\/milliard.cs     using System;     using System.Text;     namespace DAV      { class Program      { static void Main(string[] args)       { int h2 = 1000000000;\/\/or 500     int h1 = 0; int t = 0;     Random rand = new Random();     int c = rand.Next(h2); \/\/computer     int h = rand.Next(h2); \/\/human or h2\/2;       dav:      t++;     Console.WriteLine(); Console.Write(t);     Console.Write(&quot;  &quot;); Console.Write(c);     Console.Write(&quot;  &quot;); Console.Write(h);     Console.Write(&quot;  &quot;);      if(h &lt; c)      { Console.Write(&quot;MORE&quot;);      int a=h; h=(h+h2)\/2; h1=a; goto dav;      }     else if(h &gt; c)      { Console.Write(&quot;less&quot;);      int a=h; h=(h1+h)\/2; h2=a; goto dav;      }     Console.Write(&quot;win by &quot;); Console.Write(t);     Console.Write(&quot; steps&quot;); Console.ReadKey();     }}}<\/code><\/pre>\n<p>  <\/p>\n<p>\u041c\u043e\u0439 \u0441\u0442\u0438\u043b\u044c qbasic bas &amp; c# cs: <\/p>\n<p>  <\/p>\n<p>1-\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430<br \/>  \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0441\u043c\u0435\u0449\u0435\u043d\u044b \u0432\u043f\u0440\u0430\u0432\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043e\u0442 \u0441\u0442\u0440\u043e\u043a \u043d\u0438\u0436\u0435<br \/>  \u0444\u0438\u0433\u0443\u0440\u043d\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f\u0441\u044f: \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438<br \/>  \u0444\u0438\u0433\u0443\u0440\u043d\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0435\u0441\u044f: \u043f\u043e\u0434\u0440\u044f\u0434 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e<br \/>  \u0441\u043f\u0435\u0446 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u044b\u0432\u043e\u0434\u0430 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e<br \/>  \u043e\u0434\u043d\u043e\u0442\u0438\u043f\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b: \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432 1-\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u043a\u0430\u043a qbasic<br \/>  \u043c\u043d\u043e\u0433\u0438\u0435 \u043c\u043e\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c\u044b\u0435 \u043e\u043d\u043b\u0430\u0439\u043d<br \/>  \u043c\u043d\u043e\u0433\u0438\u0435 \u043c\u043e\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u044e\u0442 \u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u044e\u0442 <\/p>\n<p>  <\/p>\n<p>\u041c\u043d\u043e\u0433\u0438\u0435 \u043c\u043e\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442 \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<br \/>  \u0420\u0443\u0441\u0441\u043a\u0430\u044f \u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u041f\u043e\u043b\u043e\u0432\u0438\u043d\u0430\u043c\u0438 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e <\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ne\/qz\/wf\/neqzwfjea-onmalqzyzf_kkspem.gif\"> <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/te\/1a\/wy\/te1awyk28bjbhiyy-elv6gcybgw.gif\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/na\/yc\/cc\/nayccc_a6c2h3wpl8qmfvjonn6s.gif\">  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/b><\/p>\n<div class=\"spoiler_text\">\n<p>1 18122453 320244676 less<br \/>  2 18122453 160122338 less<br \/>  3 18122453 80061169 less<br \/>  4 18122453 40030584 less<br \/>  5 18122453 20015292 less<br \/>  6 18122453 10007646 MORE<br \/>  7 18122453 15011469 MORE<br \/>  8 18122453 17513380 MORE<br \/>  9 18122453 18764336 less<br \/>  10 18122453 18138858 less<br \/>  11 18122453 17826119 MORE<br \/>  12 18122453 17982488 MORE<br \/>  13 18122453 18060673 MORE<br \/>  14 18122453 18099765 MORE<br \/>  15 18122453 18119311 MORE<br \/>  16 18122453 18129084 less<br \/>  17 18122453 18124197 less<br \/>  18 18122453 18121754 MORE<br \/>  19 18122453 18122975 less<br \/>  20 18122453 18122364 MORE<br \/>  21 18122453 18122669 less<br \/>  22 18122453 18122516 less<br \/>  23 18122453 18122440 MORE<br \/>  24 18122453 18122478 less<br \/>  25 18122453 18122459 less<br \/>  26 18122453 18122449 MORE<\/p>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>27 18122453 18122454 less<br \/>  28 18122453 18122451 MORE<br \/>  29 18122453 18122452 MORE<br \/>  30 18122453 18122453 win by 30 steps<\/p>\n<p>  <\/p>\n<p>\u0427\u0438\u0441\u043b\u043e \u0448\u0430\u0433\u043e\u0432 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0432 \u042d\u043a\u0441\u0446\u0435\u043b\u044c Excel: <\/p>\n<p>  <\/p>\n<p>=log(10^9;2)<br \/>  =29,89<br \/>  =30<\/p>\n<p>  <\/p>\n<p>\u0427\u0442\u043e \u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u044c. \u041d\u043e\u0431\u0435\u043b\u0435\u0432\u0441\u043a\u0430\u044f \u043f\u0440\u0435\u043c\u0438\u044f \u0441\u0430\u043c\u0430 \u0441\u0435\u0431\u044f \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442.<\/p>\n<p>  <\/p>\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.25%;\"><iframe src=\"https:\/\/www.youtube.com\/embed\/YIJmgOTnkTU?rel=0&amp;showinfo=1&amp;start=33&amp;hl=en-US\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen scrolling=\"no\" allow=\"encrypted-media; accelerometer; gyroscope; picture-in-picture\"><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/0q\/xo\/87\/0qxo876febarecf6xwly9yjpqno.gif\">  <\/p>\n<p>\u0413\u043b\u0430\u0432\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442: \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b qbasic \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u0432 c#<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/495054\/\"> https:\/\/habr.com\/ru\/post\/495054\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/495054\/\">\n<p>\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u043d\u0430\u0437\u0430\u0434 \u0447\u0438\u0442\u0430\u044f \u0438\u043d\u043e\u0441\u0442\u0440\u0430\u043d\u043d\u044b\u0439 \u0444\u043e\u0440\u0443\u043c \u0438 \u0443\u0432\u0438\u0434\u0435\u0432 \u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u043d\u0438\u0435: \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 &quot;\u0443\u0433\u0430\u0434\u0430\u0439 \u0447\u0438\u0441\u043b\u043e&quot; \u043f\u043e\u043a\u043e\u0440\u043e\u0447\u0435 \u044f \u043e\u0431\u043e\u0433\u043d\u0430\u043b \u0438\u043d\u043e\u0441\u0442\u0440\u0430\u043d\u0446\u0435\u0432 1-\u043c \u0441\u043e\u0437\u0434\u0430\u0432 1-\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0430 2-\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 <\/p>\n<p>  <\/p>\n<pre><code class=\"vbscript\">1 IF Russia = 0 THEN Russia = 2222: RANDOMIZE TIMER: num = INT(RND * 100) + 1: GOTO 1 ELSE IF Russia &lt;&gt; 0 THEN INPUT n: IF n &lt; num THEN PRINT \u00abMORE\u00bb: GOTO 1 ELSE IF n &gt; num THEN PRINT \u00abless\u00bb: GOTO 1 ELSE IF n = num THEN PRINT \u00abda\u00bb: END ELSE GOTO 1 'DANILIN Russia 9-9-2019 guessnum.bas<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/c0d\/498\/f78\/c0d498f786076a2f573b7f5fd0147353.gif\" alt=\"image\"><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-301152","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/301152","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=301152"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/301152\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=301152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=301152"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=301152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}