{"action":"created","comment":{"url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/pulls/comments/86973044","pull_request_review_id":7602831,"id":86973044,"diff_hunk":"@@ -57,37 +58,90 @@ fun digitCountInNumber(n: Int, m: Int): Int =\n  * Найти количество цифр в заданном числе n.\n  * Например, число 1 содержит 1 цифру, 456 -- 3 цифры, 65536 -- 5 цифр.\n  */\n-fun digitNumber(n: Int): Int = TODO()\n+fun digitNumber(n: Int): Int {\n+    var s = 0\n+    var num = n\n+    do {\n+        s++\n+        num /= 10\n+    } while (num != 0)\n+    return s\n+}\n \n /**\n  * Простая\n  *\n  * Найти число Фибоначчи из ряда 1, 1, 2, 3, 5, 8, 13, 21, ... с номером n.\n  * Ряд Фибоначчи определён следующим образом: fib(1) = 1, fib(2) = 1, fib(n+2) = fib(n) + fib(n+1)\n  */\n-fun fib(n: Int): Int = TODO()\n+fun fib(n: Int): Int {\n+    var a = 1\n+    var a1 = 1\n+    for (i in 1..n) {\n+        if (i > 2) {\n+            a1 += a\n+            a = a1 - a\n+        }\n+    }\n+    return a1\n+}\n \n /**\n  * Простая\n  *\n  * Для заданных чисел m и n найти наименьшее общее кратное, то есть,\n  * минимальное число k, которое делится и на m и на n без остатка\n  */\n-fun lcm(m: Int, n: Int): Int = TODO()\n+fun lcm(m: Int, n: Int): Int {\n+    var a: Int\n+    var b: Int\n+    var r = 1\n+    if (m > n) {\n+        a = m\n+        b = n\n+    } else {\n+        a = n\n+        b = m\n+    }\n+    while (r != 0) {\n+        r = a % b\n+        a = b\n+        b = r\n+    }\n+    return m * n / a\n+}\n \n /**\n  * Простая\n  *\n  * Для заданного числа n > 1 найти минимальный делитель, превышающий 1\n  */\n-fun minDivisor(n: Int): Int = TODO()\n+fun minDivisor(n: Int): Int {\n+    var s = 0\n+    for (i in 2..n) {\n+        if (n % i == 0) {\n+            s = i\n+            break\n+        }\n+    }\n+    return s\n+}\n \n /**\n  * Простая\n  *\n  * Для заданного числа n > 1 найти максимальный делитель, меньший n\n  */\n-fun maxDivisor(n: Int): Int = TODO()\n+fun maxDivisor(n: Int): Int {\n+    var s = 0\n+    for (i in n / 2 downTo 1) {","path":"src/lesson3/task1/Loop.kt","position":105,"original_position":100,"commit_id":"77eb04f511d19ae1252a9a0be176208e7d6a5c74","original_commit_id":"5c98ad11376794219d305cd502f0956ccca121d8","user":{"login":"gagarski","id":6356608,"avatar_url":"https://avatars.githubusercontent.com/u/6356608?v=3","gravatar_id":"","url":"https://api.github.com/users/gagarski","html_url":"https://github.com/gagarski","followers_url":"https://api.github.com/users/gagarski/followers","following_url":"https://api.github.com/users/gagarski/following{/other_user}","gists_url":"https://api.github.com/users/gagarski/gists{/gist_id}","starred_url":"https://api.github.com/users/gagarski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gagarski/subscriptions","organizations_url":"https://api.github.com/users/gagarski/orgs","repos_url":"https://api.github.com/users/gagarski/repos","events_url":"https://api.github.com/users/gagarski/events{/privacy}","received_events_url":"https://api.github.com/users/gagarski/received_events","type":"User","site_admin":false},"body":"Можно. До квадратного корня от `n`.","created_at":"2016-11-08T11:47:07Z","updated_at":"2016-11-08T11:47:07Z","html_url":"https://github.com/Kotlin-Polytech/KotlinAsFirst2016/pull/142#discussion_r86973044","pull_request_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/pulls/142","_links":{"self":{"href":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/pulls/comments/86973044"},"html":{"href":"https://github.com/Kotlin-Polytech/KotlinAsFirst2016/pull/142#discussion_r86973044"},"pull_request":{"href":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/pulls/142"}}},"pull_request":{"url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/pulls/142","id":87352960,"html_url":"https://github.com/Kotlin-Polytech/KotlinAsFirst2016/pull/142","diff_url":"https://github.com/Kotlin-Polytech/KotlinAsFirst2016/pull/142.diff","patch_url":"https://github.com/Kotlin-Polytech/KotlinAsFirst2016/pull/142.patch","issue_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/issues/142","number":142,"state":"open","locked":false,"title":"lesson 1,2,3(не полностью)","user":{"login":"stprost","id":22049029,"avatar_url":"https://avatars.githubusercontent.com/u/22049029?v=3","gravatar_id":"","url":"https://api.github.com/users/stprost","html_url":"https://github.com/stprost","followers_url":"https://api.github.com/users/stprost/followers","following_url":"https://api.github.com/users/stprost/following{/other_user}","gists_url":"https://api.github.com/users/stprost/gists{/gist_id}","starred_url":"https://api.github.com/users/stprost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stprost/subscriptions","organizations_url":"https://api.github.com/users/stprost/orgs","repos_url":"https://api.github.com/users/stprost/repos","events_url":"https://api.github.com/users/stprost/events{/privacy}","received_events_url":"https://api.github.com/users/stprost/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-09-29T16:58:06Z","updated_at":"2016-11-08T11:47:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3343634a85367091c3a9080d60d02b4e72716325","assignee":{"login":"gagarski","id":6356608,"avatar_url":"https://avatars.githubusercontent.com/u/6356608?v=3","gravatar_id":"","url":"https://api.github.com/users/gagarski","html_url":"https://github.com/gagarski","followers_url":"https://api.github.com/users/gagarski/followers","following_url":"https://api.github.com/users/gagarski/following{/other_user}","gists_url":"https://api.github.com/users/gagarski/gists{/gist_id}","starred_url":"https://api.github.com/users/gagarski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gagarski/subscriptions","organizations_url":"https://api.github.com/users/gagarski/orgs","repos_url":"https://api.github.com/users/gagarski/repos","events_url":"https://api.github.com/users/gagarski/events{/privacy}","received_events_url":"https://api.github.com/users/gagarski/received_events","type":"User","site_admin":false},"assignees":[{"login":"gagarski","id":6356608,"avatar_url":"https://avatars.githubusercontent.com/u/6356608?v=3","gravatar_id":"","url":"https://api.github.com/users/gagarski","html_url":"https://github.com/gagarski","followers_url":"https://api.github.com/users/gagarski/followers","following_url":"https://api.github.com/users/gagarski/following{/other_user}","gists_url":"https://api.github.com/users/gagarski/gists{/gist_id}","starred_url":"https://api.github.com/users/gagarski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gagarski/subscriptions","organizations_url":"https://api.github.com/users/gagarski/orgs","repos_url":"https://api.github.com/users/gagarski/repos","events_url":"https://api.github.com/users/gagarski/events{/privacy}","received_events_url":"https://api.github.com/users/gagarski/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/pulls/142/commits","review_comments_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/pulls/142/comments","review_comment_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/issues/142/comments","statuses_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/statuses/77eb04f511d19ae1252a9a0be176208e7d6a5c74","head":{"label":"stprost:master","ref":"master","sha":"77eb04f511d19ae1252a9a0be176208e7d6a5c74","user":{"login":"stprost","id":22049029,"avatar_url":"https://avatars.githubusercontent.com/u/22049029?v=3","gravatar_id":"","url":"https://api.github.com/users/stprost","html_url":"https://github.com/stprost","followers_url":"https://api.github.com/users/stprost/followers","following_url":"https://api.github.com/users/stprost/following{/other_user}","gists_url":"https://api.github.com/users/stprost/gists{/gist_id}","starred_url":"https://api.github.com/users/stprost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stprost/subscriptions","organizations_url":"https://api.github.com/users/stprost/orgs","repos_url":"https://api.github.com/users/stprost/repos","events_url":"https://api.github.com/users/stprost/events{/privacy}","received_events_url":"https://api.github.com/users/stprost/received_events","type":"User","site_admin":false},"repo":{"id":67591632,"name":"KotlinAsFirst2016","full_name":"stprost/KotlinAsFirst2016","owner":{"login":"stprost","id":22049029,"avatar_url":"https://avatars.githubusercontent.com/u/22049029?v=3","gravatar_id":"","url":"https://api.github.com/users/stprost","html_url":"https://github.com/stprost","followers_url":"https://api.github.com/users/stprost/followers","following_url":"https://api.github.com/users/stprost/following{/other_user}","gists_url":"https://api.github.com/users/stprost/gists{/gist_id}","starred_url":"https://api.github.com/users/stprost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stprost/subscriptions","organizations_url":"https://api.github.com/users/stprost/orgs","repos_url":"https://api.github.com/users/stprost/repos","events_url":"https://api.github.com/users/stprost/events{/privacy}","received_events_url":"https://api.github.com/users/stprost/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stprost/KotlinAsFirst2016","description":null,"fork":true,"url":"https://api.github.com/repos/stprost/KotlinAsFirst2016","forks_url":"https://api.github.com/repos/stprost/KotlinAsFirst2016/forks","keys_url":"https://api.github.com/repos/stprost/KotlinAsFirst2016/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stprost/KotlinAsFirst2016/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stprost/KotlinAsFirst2016/teams","hooks_url":"https://api.github.com/repos/stprost/KotlinAsFirst2016/hooks","issue_events_url":"https://api.github.com/repos/stprost/KotlinAsFirst2016/issues/events{/number}","events_url":"https://api.github.com/repos/stprost/KotlinAsFirst2016/events","assignees_url":"https://api.github.com/repos/stprost/KotlinAsFirst2016/assignees{/user}","branches_url":"https://api.github.com/repos/stprost/KotlinAsFirst2016/branches{/branch}","tags_url":"https://api.github.com/repos/stprost/KotlinAsFirst2016/tags","blobs_url":"https://api.github.com/repos/stprost/KotlinAsFirst2016/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stprost/KotlinAsFirst2016/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stprost/KotlinAsFirst2016/git/refs{/sha}","trees_url":"https://api.github.com/repos/stprost/KotlinAsFirst2016/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stprost/KotlinAsFirst2016/statuses/{sha}","languages_url":"https://api.github.com/repos/stprost/KotlinAsFirst2016/languages","stargazers_url":"https://api.github.com/repos/stprost/KotlinAsFirst2016/stargazers","contributors_url":"https://api.github.com/repos/stprost/KotlinAsFirst2016/contributors","subscribers_url":"https://api.github.com/repos/stprost/KotlinAsFirst2016/subscribers","subscription_url":"https://api.github.com/repos/stprost/KotlinAsFirst2016/subscription","commits_url":"https://api.github.com/repos/stprost/KotlinAsFirst2016/commits{/sha}","git_commits_url":"https://api.github.com/repos/stprost/KotlinAsFirst2016/git/commits{/sha}","comments_url":"https://api.github.com/repos/stprost/KotlinAsFirst2016/comments{/number}","issue_comment_url":"https://api.github.com/repos/stprost/KotlinAsFirst2016/issues/comments{/number}","contents_url":"https://api.github.com/repos/stprost/KotlinAsFirst2016/contents/{+path}","compare_url":"https://api.github.com/repos/stprost/KotlinAsFirst2016/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stprost/KotlinAsFirst2016/merges","archive_url":"https://api.github.com/repos/stprost/KotlinAsFirst2016/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stprost/KotlinAsFirst2016/downloads","issues_url":"https://api.github.com/repos/stprost/KotlinAsFirst2016/issues{/number}","pulls_url":"https://api.github.com/repos/stprost/KotlinAsFirst2016/pulls{/number}","milestones_url":"https://api.github.com/repos/stprost/KotlinAsFirst2016/milestones{/number}","notifications_url":"https://api.github.com/repos/stprost/KotlinAsFirst2016/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stprost/KotlinAsFirst2016/labels{/name}","releases_url":"https://api.github.com/repos/stprost/KotlinAsFirst2016/releases{/id}","deployments_url":"https://api.github.com/repos/stprost/KotlinAsFirst2016/deployments","created_at":"2016-09-07T09:17:35Z","updated_at":"2016-09-07T09:17:37Z","pushed_at":"2016-11-02T10:33:51Z","git_url":"git://github.com/stprost/KotlinAsFirst2016.git","ssh_url":"git@github.com:stprost/KotlinAsFirst2016.git","clone_url":"https://github.com/stprost/KotlinAsFirst2016.git","svn_url":"https://github.com/stprost/KotlinAsFirst2016","homepage":null,"size":7607,"stargazers_count":0,"watchers_count":0,"language":"Kotlin","has_issues":false,"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":"Kotlin-Polytech:master","ref":"master","sha":"7926a781d6c533d797a9bb82c70eb00508a94f34","user":{"login":"Kotlin-Polytech","id":20967488,"avatar_url":"https://avatars.githubusercontent.com/u/20967488?v=3","gravatar_id":"","url":"https://api.github.com/users/Kotlin-Polytech","html_url":"https://github.com/Kotlin-Polytech","followers_url":"https://api.github.com/users/Kotlin-Polytech/followers","following_url":"https://api.github.com/users/Kotlin-Polytech/following{/other_user}","gists_url":"https://api.github.com/users/Kotlin-Polytech/gists{/gist_id}","starred_url":"https://api.github.com/users/Kotlin-Polytech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kotlin-Polytech/subscriptions","organizations_url":"https://api.github.com/users/Kotlin-Polytech/orgs","repos_url":"https://api.github.com/users/Kotlin-Polytech/repos","events_url":"https://api.github.com/users/Kotlin-Polytech/events{/privacy}","received_events_url":"https://api.github.com/users/Kotlin-Polytech/received_events","type":"Organization","site_admin":false},"repo":{"id":67405509,"name":"KotlinAsFirst2016","full_name":"Kotlin-Polytech/KotlinAsFirst2016","owner":{"login":"Kotlin-Polytech","id":20967488,"avatar_url":"https://avatars.githubusercontent.com/u/20967488?v=3","gravatar_id":"","url":"https://api.github.com/users/Kotlin-Polytech","html_url":"https://github.com/Kotlin-Polytech","followers_url":"https://api.github.com/users/Kotlin-Polytech/followers","following_url":"https://api.github.com/users/Kotlin-Polytech/following{/other_user}","gists_url":"https://api.github.com/users/Kotlin-Polytech/gists{/gist_id}","starred_url":"https://api.github.com/users/Kotlin-Polytech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kotlin-Polytech/subscriptions","organizations_url":"https://api.github.com/users/Kotlin-Polytech/orgs","repos_url":"https://api.github.com/users/Kotlin-Polytech/repos","events_url":"https://api.github.com/users/Kotlin-Polytech/events{/privacy}","received_events_url":"https://api.github.com/users/Kotlin-Polytech/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Kotlin-Polytech/KotlinAsFirst2016","description":null,"fork":false,"url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016","forks_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/forks","keys_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/teams","hooks_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/hooks","issue_events_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/issues/events{/number}","events_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/events","assignees_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/assignees{/user}","branches_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/branches{/branch}","tags_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/tags","blobs_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/git/refs{/sha}","trees_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/statuses/{sha}","languages_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/languages","stargazers_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/stargazers","contributors_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/contributors","subscribers_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/subscribers","subscription_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/subscription","commits_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/commits{/sha}","git_commits_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/git/commits{/sha}","comments_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/comments{/number}","issue_comment_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/issues/comments{/number}","contents_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/contents/{+path}","compare_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/merges","archive_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/downloads","issues_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/issues{/number}","pulls_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/pulls{/number}","milestones_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/milestones{/number}","notifications_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/labels{/name}","releases_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/releases{/id}","deployments_url":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/deployments","created_at":"2016-09-05T09:06:26Z","updated_at":"2016-11-08T08:08:19Z","pushed_at":"2016-11-08T07:38:58Z","git_url":"git://github.com/Kotlin-Polytech/KotlinAsFirst2016.git","ssh_url":"git@github.com:Kotlin-Polytech/KotlinAsFirst2016.git","clone_url":"https://github.com/Kotlin-Polytech/KotlinAsFirst2016.git","svn_url":"https://github.com/Kotlin-Polytech/KotlinAsFirst2016","homepage":null,"size":22141,"stargazers_count":17,"watchers_count":17,"language":"Kotlin","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":100,"mirror_url":null,"open_issues_count":80,"forks":100,"open_issues":80,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/pulls/142"},"html":{"href":"https://github.com/Kotlin-Polytech/KotlinAsFirst2016/pull/142"},"issue":{"href":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/issues/142"},"comments":{"href":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/issues/142/comments"},"review_comments":{"href":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/pulls/142/comments"},"review_comment":{"href":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/pulls/142/commits"},"statuses":{"href":"https://api.github.com/repos/Kotlin-Polytech/KotlinAsFirst2016/statuses/77eb04f511d19ae1252a9a0be176208e7d6a5c74"}}}}
{"actor":{"display_login":"gagarski"}}