{"action":"created","issue":{"url":"https://api.github.com/repos/SHU-2016-SummerPractice/AlgorithmExerciseIssues/issues/39","repository_url":"https://api.github.com/repos/SHU-2016-SummerPractice/AlgorithmExerciseIssues","labels_url":"https://api.github.com/repos/SHU-2016-SummerPractice/AlgorithmExerciseIssues/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/SHU-2016-SummerPractice/AlgorithmExerciseIssues/issues/39/comments","events_url":"https://api.github.com/repos/SHU-2016-SummerPractice/AlgorithmExerciseIssues/issues/39/events","html_url":"https://github.com/SHU-2016-SummerPractice/AlgorithmExerciseIssues/issues/39","id":173364769,"number":39,"title":"数字处理 2016-8-26","user":{"login":"zhaokuohaha","id":16274628,"avatar_url":"https://avatars.githubusercontent.com/u/16274628?v=3","gravatar_id":"","url":"https://api.github.com/users/zhaokuohaha","html_url":"https://github.com/zhaokuohaha","followers_url":"https://api.github.com/users/zhaokuohaha/followers","following_url":"https://api.github.com/users/zhaokuohaha/following{/other_user}","gists_url":"https://api.github.com/users/zhaokuohaha/gists{/gist_id}","starred_url":"https://api.github.com/users/zhaokuohaha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhaokuohaha/subscriptions","organizations_url":"https://api.github.com/users/zhaokuohaha/orgs","repos_url":"https://api.github.com/users/zhaokuohaha/repos","events_url":"https://api.github.com/users/zhaokuohaha/events{/privacy}","received_events_url":"https://api.github.com/users/zhaokuohaha/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-08-26T03:53:05Z","updated_at":"2016-08-27T16:47:04Z","closed_at":null,"body":"[27. Remove Element](https://leetcode.com/problems/remove-element/)\r\n[29. Divide Two Integers ](https://leetcode.com/problems/divide-two-integers/)"},"comment":{"url":"https://api.github.com/repos/SHU-2016-SummerPractice/AlgorithmExerciseIssues/issues/comments/242927741","html_url":"https://github.com/SHU-2016-SummerPractice/AlgorithmExerciseIssues/issues/39#issuecomment-242927741","issue_url":"https://api.github.com/repos/SHU-2016-SummerPractice/AlgorithmExerciseIssues/issues/39","id":242927741,"user":{"login":"zhaokuohaha","id":16274628,"avatar_url":"https://avatars.githubusercontent.com/u/16274628?v=3","gravatar_id":"","url":"https://api.github.com/users/zhaokuohaha","html_url":"https://github.com/zhaokuohaha","followers_url":"https://api.github.com/users/zhaokuohaha/followers","following_url":"https://api.github.com/users/zhaokuohaha/following{/other_user}","gists_url":"https://api.github.com/users/zhaokuohaha/gists{/gist_id}","starred_url":"https://api.github.com/users/zhaokuohaha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhaokuohaha/subscriptions","organizations_url":"https://api.github.com/users/zhaokuohaha/orgs","repos_url":"https://api.github.com/users/zhaokuohaha/repos","events_url":"https://api.github.com/users/zhaokuohaha/events{/privacy}","received_events_url":"https://api.github.com/users/zhaokuohaha/received_events","type":"User","site_admin":false},"created_at":"2016-08-27T16:47:04Z","updated_at":"2016-08-27T16:47:04Z","body":"## 29 - 搬代码 - 看不懂\r\n```csharp\r\npublic class Solution\r\n{\r\n\tpublic int Divide(int dividend, int divisor)\r\n\t{\r\n\t\tif (divisor == 0) return int.MaxValue;\r\n\t\tint sign = dividend > 0 ^ divisor > 0 ? -1 : 1;\r\n\t\tlong m = Math.Abs((long)dividend);\r\n\t\tlong n = Math.Abs((long)divisor);\r\n\t\tlong count = 0;\r\n\t\tfor(m-=n; m>=0; m -= n)\r\n\t\t{\r\n\t\t\tcount++;\r\n\t\t\tif (m == 0) break;\r\n\t\t\tfor(int subCount = 1; m -(n << subCount) >=0; subCount++)\r\n\t\t\t{\r\n\t\t\t\tm -= n << subCount;\r\n\t\t\t\tcount += (int)Math.Pow(2, subCount);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (sign == 1) return (int)Math.Min(count, int.MaxValue);\r\n\t\treturn (int)-count;\r\n\t}\r\n}\r\n```"}}
{"actor":{"display_login":"zhaokuohaha"}}