{"action":"created","comment":{"url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/pulls/comments/39908787","id":39908787,"diff_hunk":"@@ -0,0 +1,14 @@\n+from sys import stdin\n+\n+def exchange(n, coins):\n+    if n == 0:\n+        return 1\n+    elif n < 0 or len(coins) == 0:\n+        return 0\n+    else:\n+        return exchange(n, coins[1:amount]) + exchange(n - coins[0], coins)","path":"lab3/Malkov/exchange.py","position":9,"original_position":9,"commit_id":"f3a237ceb208c259d26a1c0df948363ce1b6a2e0","original_commit_id":"f3a237ceb208c259d26a1c0df948363ce1b6a2e0","user":{"login":"MikhailErofeev","id":1856491,"avatar_url":"https://avatars.githubusercontent.com/u/1856491?v=3","gravatar_id":"","url":"https://api.github.com/users/MikhailErofeev","html_url":"https://github.com/MikhailErofeev","followers_url":"https://api.github.com/users/MikhailErofeev/followers","following_url":"https://api.github.com/users/MikhailErofeev/following{/other_user}","gists_url":"https://api.github.com/users/MikhailErofeev/gists{/gist_id}","starred_url":"https://api.github.com/users/MikhailErofeev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikhailErofeev/subscriptions","organizations_url":"https://api.github.com/users/MikhailErofeev/orgs","repos_url":"https://api.github.com/users/MikhailErofeev/repos","events_url":"https://api.github.com/users/MikhailErofeev/events{/privacy}","received_events_url":"https://api.github.com/users/MikhailErofeev/received_events","type":"User","site_admin":false},"body":"Красивый подход вызывать функцию для sublist, но обратите внимание, что python создаёт в этой операции урезанную копию листа с данными. Java, например, в похожем методе сделала бы просто view, хранящий указатели на начало и конец в исходном списке. В python такую функциональность можно найти в numpy. http://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.view.html \r\nЭто не замечание, можно не исправлять, просто интересный факт","created_at":"2015-09-18T22:51:36Z","updated_at":"2015-09-18T22:51:36Z","html_url":"https://github.com/MikhailErofeev/a3200-2015-algs/pull/34#discussion_r39908787","pull_request_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/pulls/34","_links":{"self":{"href":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/pulls/comments/39908787"},"html":{"href":"https://github.com/MikhailErofeev/a3200-2015-algs/pull/34#discussion_r39908787"},"pull_request":{"href":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/pulls/34"}}},"pull_request":{"url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/pulls/34","id":45451106,"html_url":"https://github.com/MikhailErofeev/a3200-2015-algs/pull/34","diff_url":"https://github.com/MikhailErofeev/a3200-2015-algs/pull/34.diff","patch_url":"https://github.com/MikhailErofeev/a3200-2015-algs/pull/34.patch","issue_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/issues/34","number":34,"state":"open","locked":false,"title":"Мальков 2-3","user":{"login":"paulmalk","id":14348399,"avatar_url":"https://avatars.githubusercontent.com/u/14348399?v=3","gravatar_id":"","url":"https://api.github.com/users/paulmalk","html_url":"https://github.com/paulmalk","followers_url":"https://api.github.com/users/paulmalk/followers","following_url":"https://api.github.com/users/paulmalk/following{/other_user}","gists_url":"https://api.github.com/users/paulmalk/gists{/gist_id}","starred_url":"https://api.github.com/users/paulmalk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulmalk/subscriptions","organizations_url":"https://api.github.com/users/paulmalk/orgs","repos_url":"https://api.github.com/users/paulmalk/repos","events_url":"https://api.github.com/users/paulmalk/events{/privacy}","received_events_url":"https://api.github.com/users/paulmalk/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-09-18T20:50:09Z","updated_at":"2015-09-18T22:51:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"43afe1cddcc0178bca517c877d7c0a6c50a1b06d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/pulls/34/commits","review_comments_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/pulls/34/comments","review_comment_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/issues/34/comments","statuses_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/statuses/f3a237ceb208c259d26a1c0df948363ce1b6a2e0","head":{"label":"paulmalk:master","ref":"master","sha":"f3a237ceb208c259d26a1c0df948363ce1b6a2e0","user":{"login":"paulmalk","id":14348399,"avatar_url":"https://avatars.githubusercontent.com/u/14348399?v=3","gravatar_id":"","url":"https://api.github.com/users/paulmalk","html_url":"https://github.com/paulmalk","followers_url":"https://api.github.com/users/paulmalk/followers","following_url":"https://api.github.com/users/paulmalk/following{/other_user}","gists_url":"https://api.github.com/users/paulmalk/gists{/gist_id}","starred_url":"https://api.github.com/users/paulmalk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulmalk/subscriptions","organizations_url":"https://api.github.com/users/paulmalk/orgs","repos_url":"https://api.github.com/users/paulmalk/repos","events_url":"https://api.github.com/users/paulmalk/events{/privacy}","received_events_url":"https://api.github.com/users/paulmalk/received_events","type":"User","site_admin":false},"repo":{"id":42730357,"name":"a3200-2015-algs","full_name":"paulmalk/a3200-2015-algs","owner":{"login":"paulmalk","id":14348399,"avatar_url":"https://avatars.githubusercontent.com/u/14348399?v=3","gravatar_id":"","url":"https://api.github.com/users/paulmalk","html_url":"https://github.com/paulmalk","followers_url":"https://api.github.com/users/paulmalk/followers","following_url":"https://api.github.com/users/paulmalk/following{/other_user}","gists_url":"https://api.github.com/users/paulmalk/gists{/gist_id}","starred_url":"https://api.github.com/users/paulmalk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulmalk/subscriptions","organizations_url":"https://api.github.com/users/paulmalk/orgs","repos_url":"https://api.github.com/users/paulmalk/repos","events_url":"https://api.github.com/users/paulmalk/events{/privacy}","received_events_url":"https://api.github.com/users/paulmalk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/paulmalk/a3200-2015-algs","description":"","fork":true,"url":"https://api.github.com/repos/paulmalk/a3200-2015-algs","forks_url":"https://api.github.com/repos/paulmalk/a3200-2015-algs/forks","keys_url":"https://api.github.com/repos/paulmalk/a3200-2015-algs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/paulmalk/a3200-2015-algs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/paulmalk/a3200-2015-algs/teams","hooks_url":"https://api.github.com/repos/paulmalk/a3200-2015-algs/hooks","issue_events_url":"https://api.github.com/repos/paulmalk/a3200-2015-algs/issues/events{/number}","events_url":"https://api.github.com/repos/paulmalk/a3200-2015-algs/events","assignees_url":"https://api.github.com/repos/paulmalk/a3200-2015-algs/assignees{/user}","branches_url":"https://api.github.com/repos/paulmalk/a3200-2015-algs/branches{/branch}","tags_url":"https://api.github.com/repos/paulmalk/a3200-2015-algs/tags","blobs_url":"https://api.github.com/repos/paulmalk/a3200-2015-algs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/paulmalk/a3200-2015-algs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/paulmalk/a3200-2015-algs/git/refs{/sha}","trees_url":"https://api.github.com/repos/paulmalk/a3200-2015-algs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/paulmalk/a3200-2015-algs/statuses/{sha}","languages_url":"https://api.github.com/repos/paulmalk/a3200-2015-algs/languages","stargazers_url":"https://api.github.com/repos/paulmalk/a3200-2015-algs/stargazers","contributors_url":"https://api.github.com/repos/paulmalk/a3200-2015-algs/contributors","subscribers_url":"https://api.github.com/repos/paulmalk/a3200-2015-algs/subscribers","subscription_url":"https://api.github.com/repos/paulmalk/a3200-2015-algs/subscription","commits_url":"https://api.github.com/repos/paulmalk/a3200-2015-algs/commits{/sha}","git_commits_url":"https://api.github.com/repos/paulmalk/a3200-2015-algs/git/commits{/sha}","comments_url":"https://api.github.com/repos/paulmalk/a3200-2015-algs/comments{/number}","issue_comment_url":"https://api.github.com/repos/paulmalk/a3200-2015-algs/issues/comments{/number}","contents_url":"https://api.github.com/repos/paulmalk/a3200-2015-algs/contents/{+path}","compare_url":"https://api.github.com/repos/paulmalk/a3200-2015-algs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/paulmalk/a3200-2015-algs/merges","archive_url":"https://api.github.com/repos/paulmalk/a3200-2015-algs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/paulmalk/a3200-2015-algs/downloads","issues_url":"https://api.github.com/repos/paulmalk/a3200-2015-algs/issues{/number}","pulls_url":"https://api.github.com/repos/paulmalk/a3200-2015-algs/pulls{/number}","milestones_url":"https://api.github.com/repos/paulmalk/a3200-2015-algs/milestones{/number}","notifications_url":"https://api.github.com/repos/paulmalk/a3200-2015-algs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/paulmalk/a3200-2015-algs/labels{/name}","releases_url":"https://api.github.com/repos/paulmalk/a3200-2015-algs/releases{/id}","created_at":"2015-09-18T15:25:20Z","updated_at":"2015-09-18T15:25:21Z","pushed_at":"2015-09-18T22:05:10Z","git_url":"git://github.com/paulmalk/a3200-2015-algs.git","ssh_url":"git@github.com:paulmalk/a3200-2015-algs.git","clone_url":"https://github.com/paulmalk/a3200-2015-algs.git","svn_url":"https://github.com/paulmalk/a3200-2015-algs","homepage":null,"size":1196,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"MikhailErofeev:master","ref":"master","sha":"276815290f1c5201fa84543a2a09e9cab3a660b1","user":{"login":"MikhailErofeev","id":1856491,"avatar_url":"https://avatars.githubusercontent.com/u/1856491?v=3","gravatar_id":"","url":"https://api.github.com/users/MikhailErofeev","html_url":"https://github.com/MikhailErofeev","followers_url":"https://api.github.com/users/MikhailErofeev/followers","following_url":"https://api.github.com/users/MikhailErofeev/following{/other_user}","gists_url":"https://api.github.com/users/MikhailErofeev/gists{/gist_id}","starred_url":"https://api.github.com/users/MikhailErofeev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikhailErofeev/subscriptions","organizations_url":"https://api.github.com/users/MikhailErofeev/orgs","repos_url":"https://api.github.com/users/MikhailErofeev/repos","events_url":"https://api.github.com/users/MikhailErofeev/events{/privacy}","received_events_url":"https://api.github.com/users/MikhailErofeev/received_events","type":"User","site_admin":false},"repo":{"id":42346823,"name":"a3200-2015-algs","full_name":"MikhailErofeev/a3200-2015-algs","owner":{"login":"MikhailErofeev","id":1856491,"avatar_url":"https://avatars.githubusercontent.com/u/1856491?v=3","gravatar_id":"","url":"https://api.github.com/users/MikhailErofeev","html_url":"https://github.com/MikhailErofeev","followers_url":"https://api.github.com/users/MikhailErofeev/followers","following_url":"https://api.github.com/users/MikhailErofeev/following{/other_user}","gists_url":"https://api.github.com/users/MikhailErofeev/gists{/gist_id}","starred_url":"https://api.github.com/users/MikhailErofeev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikhailErofeev/subscriptions","organizations_url":"https://api.github.com/users/MikhailErofeev/orgs","repos_url":"https://api.github.com/users/MikhailErofeev/repos","events_url":"https://api.github.com/users/MikhailErofeev/events{/privacy}","received_events_url":"https://api.github.com/users/MikhailErofeev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MikhailErofeev/a3200-2015-algs","description":"","fork":false,"url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs","forks_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/forks","keys_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/teams","hooks_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/hooks","issue_events_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/issues/events{/number}","events_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/events","assignees_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/assignees{/user}","branches_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/branches{/branch}","tags_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/tags","blobs_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/git/refs{/sha}","trees_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/statuses/{sha}","languages_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/languages","stargazers_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/stargazers","contributors_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/contributors","subscribers_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/subscribers","subscription_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/subscription","commits_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/commits{/sha}","git_commits_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/git/commits{/sha}","comments_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/comments{/number}","issue_comment_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/issues/comments{/number}","contents_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/contents/{+path}","compare_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/merges","archive_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/downloads","issues_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/issues{/number}","pulls_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/pulls{/number}","milestones_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/milestones{/number}","notifications_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/labels{/name}","releases_url":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/releases{/id}","created_at":"2015-09-12T06:08:16Z","updated_at":"2015-09-12T07:55:13Z","pushed_at":"2015-09-18T22:40:25Z","git_url":"git://github.com/MikhailErofeev/a3200-2015-algs.git","ssh_url":"git@github.com:MikhailErofeev/a3200-2015-algs.git","clone_url":"https://github.com/MikhailErofeev/a3200-2015-algs.git","svn_url":"https://github.com/MikhailErofeev/a3200-2015-algs","homepage":null,"size":1196,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":9,"forks":21,"open_issues":9,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/pulls/34"},"html":{"href":"https://github.com/MikhailErofeev/a3200-2015-algs/pull/34"},"issue":{"href":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/issues/34"},"comments":{"href":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/issues/34/comments"},"review_comments":{"href":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/pulls/34/comments"},"review_comment":{"href":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/pulls/34/commits"},"statuses":{"href":"https://api.github.com/repos/MikhailErofeev/a3200-2015-algs/statuses/f3a237ceb208c259d26a1c0df948363ce1b6a2e0"}}}}