{"action":"created","comment":{"url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/comments/144426591","pull_request_review_id":69083350,"id":144426591,"diff_hunk":"@@ -0,0 +1,164 @@\n+require 'rubygems'\n+require 'zip'\n+require 'json'\n+\n+name = ENV[\"NAME\"]\n+\n+def is_number? string\n+  true if Float(string) rescue false\n+end\n+\n+def buildTreeDivideAndConquer(treeArray, levelOfDepth, branchDir)\n+\n+  l = treeArray[0]\n+  r = treeArray[1]\n+  @maximal_depth = levelOfDepth > @maximal_depth? levelOfDepth : @maximal_depth\n+  if (l.is_a?(Integer))\n+    @a[levelOfDepth].push([l, branchDir])\n+    @vertex_sum += l\n+    levelOfDepth += 1\n+  end\n+\n+  if (r.is_a?(Integer))\n+    if l.is_a?(Integer)\n+       levelOfDepth -= 1\n+    end\n+    @a[levelOfDepth].push([r, branchDir])\n+    @vertex_sum += r\n+  end\n+\n+  if (l.is_a?(Array))\n+    buildTreeDivideAndConquer(l, levelOfDepth, 'l')\n+  end\n+\n+  if (r.is_a?(Array))\n+    buildTreeDivideAndConquer(r, levelOfDepth, 'r')\n+  end\n+\n+end\n+\n+def buildPrintTree()\n+  19.times do\n+    @a.push([])\n+  end\n+end\n+\n+def printTree()\n+  n = @maximal_depth\n+  (0..2*(2**(n-1))).each do |i|\n+    print ' '\n+  end\n+  print @a[1][0][0]\n+  puts\n+\n+  (1 .. n - 1).each do |i|\n+    str = String.new(\"\")\n+    count = 0\n+    #Вывод значений\n+    (1..(2**(n-i)-1)).each do\n+      str += ' '\n+    end\n+    str += @a[i + 1][count][0].to_s\n+    count += 1\n+    k = 1\n+    (1 .. (2**i)-1).each do\n+      (1..2**(n-i+1) - 1).each do\n+        str += ' '\n+      end\n+      if (k == 0)\n+        str += @a[i + 1][count][0].to_s\n+        count += 1\n+        k = 1\n+      else\n+        str += @a[i + 1][count][0].to_s\n+        count += 1\n+        k = 0\n+      end\n+    end\n+\n+    flag = false\n+    k = 0\n+    calc = 0\n+    str.split(\"\").each do |i|\n+      if (is_number?(i)) && !flag\n+        if (k == 0)\n+          print\"/\"\n+          k = 1\n+        else\n+          print \"\\\\\"\n+          k = 0\n+        end\n+        flag = true\n+      elsif (is_number?(i) && flag)\n+        print ' '\n+      elsif (i == ' ')","path":"2017/VyacheslavLukyanenko/1/vlukyane.rb","position":94,"original_position":94,"commit_id":"738f690bc5f085457446d66cdbf871c3c4e41144","original_commit_id":"738f690bc5f085457446d66cdbf871c3c4e41144","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Don't use parentheses around the condition of an elsif.","created_at":"2017-10-12T22:32:07Z","updated_at":"2017-10-12T22:32:08Z","html_url":"https://github.com/rubyroidlabs/bsuir-courses/pull/556#discussion_r144426591","pull_request_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/556","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/comments/144426591"},"html":{"href":"https://github.com/rubyroidlabs/bsuir-courses/pull/556#discussion_r144426591"},"pull_request":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/556"}}},"pull_request":{"url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/556","id":146328776,"html_url":"https://github.com/rubyroidlabs/bsuir-courses/pull/556","diff_url":"https://github.com/rubyroidlabs/bsuir-courses/pull/556.diff","patch_url":"https://github.com/rubyroidlabs/bsuir-courses/pull/556.patch","issue_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/issues/556","number":556,"state":"open","locked":false,"title":"implement hw-1","user":{"login":"vlukyaneRubyLabs","id":32751171,"avatar_url":"https://avatars1.githubusercontent.com/u/32751171?v=4","gravatar_id":"","url":"https://api.github.com/users/vlukyaneRubyLabs","html_url":"https://github.com/vlukyaneRubyLabs","followers_url":"https://api.github.com/users/vlukyaneRubyLabs/followers","following_url":"https://api.github.com/users/vlukyaneRubyLabs/following{/other_user}","gists_url":"https://api.github.com/users/vlukyaneRubyLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/vlukyaneRubyLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vlukyaneRubyLabs/subscriptions","organizations_url":"https://api.github.com/users/vlukyaneRubyLabs/orgs","repos_url":"https://api.github.com/users/vlukyaneRubyLabs/repos","events_url":"https://api.github.com/users/vlukyaneRubyLabs/events{/privacy}","received_events_url":"https://api.github.com/users/vlukyaneRubyLabs/received_events","type":"User","site_admin":false},"body":"## Фамилия Имя\r\nЛукьяненко Вячеслав\r\n\r\n## Email\r\nvlukyane@yandex.ru\r\n\r\n## Номер домашнего задания\r\n1\r\n\r\n## Ссылка на видео с демо работы\r\nhttps://www.youtube.com/watch?v=Hya0I5JvovE\r\n\r\n## Комментарии\r\nlvl 3\r\n","created_at":"2017-10-12T22:18:34Z","updated_at":"2017-10-12T22:32:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"45862946b21eae9d8941d020d94d7a91bc0b7372","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/556/commits","review_comments_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/556/comments","review_comment_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/issues/556/comments","statuses_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/statuses/738f690bc5f085457446d66cdbf871c3c4e41144","head":{"label":"vlukyaneRubyLabs:homework-1","ref":"homework-1","sha":"738f690bc5f085457446d66cdbf871c3c4e41144","user":{"login":"vlukyaneRubyLabs","id":32751171,"avatar_url":"https://avatars1.githubusercontent.com/u/32751171?v=4","gravatar_id":"","url":"https://api.github.com/users/vlukyaneRubyLabs","html_url":"https://github.com/vlukyaneRubyLabs","followers_url":"https://api.github.com/users/vlukyaneRubyLabs/followers","following_url":"https://api.github.com/users/vlukyaneRubyLabs/following{/other_user}","gists_url":"https://api.github.com/users/vlukyaneRubyLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/vlukyaneRubyLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vlukyaneRubyLabs/subscriptions","organizations_url":"https://api.github.com/users/vlukyaneRubyLabs/orgs","repos_url":"https://api.github.com/users/vlukyaneRubyLabs/repos","events_url":"https://api.github.com/users/vlukyaneRubyLabs/events{/privacy}","received_events_url":"https://api.github.com/users/vlukyaneRubyLabs/received_events","type":"User","site_admin":false},"repo":{"id":106748935,"name":"bsuir-courses","full_name":"vlukyaneRubyLabs/bsuir-courses","owner":{"login":"vlukyaneRubyLabs","id":32751171,"avatar_url":"https://avatars1.githubusercontent.com/u/32751171?v=4","gravatar_id":"","url":"https://api.github.com/users/vlukyaneRubyLabs","html_url":"https://github.com/vlukyaneRubyLabs","followers_url":"https://api.github.com/users/vlukyaneRubyLabs/followers","following_url":"https://api.github.com/users/vlukyaneRubyLabs/following{/other_user}","gists_url":"https://api.github.com/users/vlukyaneRubyLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/vlukyaneRubyLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vlukyaneRubyLabs/subscriptions","organizations_url":"https://api.github.com/users/vlukyaneRubyLabs/orgs","repos_url":"https://api.github.com/users/vlukyaneRubyLabs/repos","events_url":"https://api.github.com/users/vlukyaneRubyLabs/events{/privacy}","received_events_url":"https://api.github.com/users/vlukyaneRubyLabs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vlukyaneRubyLabs/bsuir-courses","description":"This is common repository for all student to submit all their homeworks","fork":true,"url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses","forks_url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses/forks","keys_url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses/teams","hooks_url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses/hooks","issue_events_url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses/issues/events{/number}","events_url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses/events","assignees_url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses/assignees{/user}","branches_url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses/branches{/branch}","tags_url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses/tags","blobs_url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses/git/refs{/sha}","trees_url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses/statuses/{sha}","languages_url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses/languages","stargazers_url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses/stargazers","contributors_url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses/contributors","subscribers_url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses/subscribers","subscription_url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses/subscription","commits_url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses/commits{/sha}","git_commits_url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses/git/commits{/sha}","comments_url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses/comments{/number}","issue_comment_url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses/issues/comments{/number}","contents_url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses/contents/{+path}","compare_url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses/merges","archive_url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses/downloads","issues_url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses/issues{/number}","pulls_url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses/pulls{/number}","milestones_url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses/milestones{/number}","notifications_url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses/labels{/name}","releases_url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses/releases{/id}","deployments_url":"https://api.github.com/repos/vlukyaneRubyLabs/bsuir-courses/deployments","created_at":"2017-10-12T21:49:33Z","updated_at":"2017-10-12T21:49:36Z","pushed_at":"2017-10-12T22:31:56Z","git_url":"git://github.com/vlukyaneRubyLabs/bsuir-courses.git","ssh_url":"git@github.com:vlukyaneRubyLabs/bsuir-courses.git","clone_url":"https://github.com/vlukyaneRubyLabs/bsuir-courses.git","svn_url":"https://github.com/vlukyaneRubyLabs/bsuir-courses","homepage":null,"size":14433,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rubyroidlabs:master","ref":"master","sha":"4aee13f8b97435b8d3ca59d30aea93e3af4712b2","user":{"login":"rubyroidlabs","id":5137565,"avatar_url":"https://avatars1.githubusercontent.com/u/5137565?v=4","gravatar_id":"","url":"https://api.github.com/users/rubyroidlabs","html_url":"https://github.com/rubyroidlabs","followers_url":"https://api.github.com/users/rubyroidlabs/followers","following_url":"https://api.github.com/users/rubyroidlabs/following{/other_user}","gists_url":"https://api.github.com/users/rubyroidlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rubyroidlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubyroidlabs/subscriptions","organizations_url":"https://api.github.com/users/rubyroidlabs/orgs","repos_url":"https://api.github.com/users/rubyroidlabs/repos","events_url":"https://api.github.com/users/rubyroidlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rubyroidlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":14405320,"name":"bsuir-courses","full_name":"rubyroidlabs/bsuir-courses","owner":{"login":"rubyroidlabs","id":5137565,"avatar_url":"https://avatars1.githubusercontent.com/u/5137565?v=4","gravatar_id":"","url":"https://api.github.com/users/rubyroidlabs","html_url":"https://github.com/rubyroidlabs","followers_url":"https://api.github.com/users/rubyroidlabs/followers","following_url":"https://api.github.com/users/rubyroidlabs/following{/other_user}","gists_url":"https://api.github.com/users/rubyroidlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rubyroidlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubyroidlabs/subscriptions","organizations_url":"https://api.github.com/users/rubyroidlabs/orgs","repos_url":"https://api.github.com/users/rubyroidlabs/repos","events_url":"https://api.github.com/users/rubyroidlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rubyroidlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rubyroidlabs/bsuir-courses","description":"This is common repository for all student to submit all their homeworks","fork":false,"url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses","forks_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/forks","keys_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/teams","hooks_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/hooks","issue_events_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/issues/events{/number}","events_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/events","assignees_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/assignees{/user}","branches_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/branches{/branch}","tags_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/tags","blobs_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/git/refs{/sha}","trees_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/statuses/{sha}","languages_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/languages","stargazers_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/stargazers","contributors_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/contributors","subscribers_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/subscribers","subscription_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/subscription","commits_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/commits{/sha}","git_commits_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/git/commits{/sha}","comments_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/comments{/number}","issue_comment_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/issues/comments{/number}","contents_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/contents/{+path}","compare_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/merges","archive_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/downloads","issues_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/issues{/number}","pulls_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls{/number}","milestones_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/milestones{/number}","notifications_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/labels{/name}","releases_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/releases{/id}","deployments_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/deployments","created_at":"2013-11-14T19:55:12Z","updated_at":"2017-10-09T03:35:39Z","pushed_at":"2017-10-12T22:32:01Z","git_url":"git://github.com/rubyroidlabs/bsuir-courses.git","ssh_url":"git@github.com:rubyroidlabs/bsuir-courses.git","clone_url":"https://github.com/rubyroidlabs/bsuir-courses.git","svn_url":"https://github.com/rubyroidlabs/bsuir-courses","homepage":null,"size":14433,"stargazers_count":35,"watchers_count":35,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":188,"mirror_url":null,"open_issues_count":15,"forks":188,"open_issues":15,"watchers":35,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/556"},"html":{"href":"https://github.com/rubyroidlabs/bsuir-courses/pull/556"},"issue":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/issues/556"},"comments":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/issues/556/comments"},"review_comments":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/556/comments"},"review_comment":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/556/commits"},"statuses":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/statuses/738f690bc5f085457446d66cdbf871c3c4e41144"}},"author_association":"NONE"}}
{"actor":{"display_login":"houndci-bot"}}