{"action":"created","comment":{"url":"https://api.github.com/repos/a3095194/algorithm/pulls/comments/74715489","id":74715489,"diff_hunk":"@@ -0,0 +1,53 @@\n+﻿package jp.ditgroup.algorithm;\n+\n+import jp.ditgroup.common.CastUtil;\n+import jp.ditgroup.common.NumberUtil;\n+\n+public class DefiniteIntegral {\n+\t/**\n+\t * 入力チェックと区間幅の格納\n+\t *\n+\t * @param args\n+\t *            コマンドライン引数(任意の区間幅)\n+\t */\n+\tpublic static void main(String[] args) {\n+\t\t// 数字であるかの入力チェック\n+\t\tif (!NumberUtil.isDouble(args[0])) {\n+\t\t\tSystem.out.println(\"数字以外もしくは整数が入力されました\");\n+\t\t}\n+\t\t// 区間幅をコマンドライン引数からString→double変換して取得\n+\t\tdouble secRange = CastUtil.strToDouble(args[0]);\n+\t\tif (secRange > 0.0) {\n+\t\t\t// 台形の公式を使った定積分の結果を取得\n+\t\t\tdouble answer = calculateDefiniteIntegral(secRange);\n+\t\t\tif (answer != 0.0) {\n+\t\t\t\tSystem.out.println(answer);\n+\t\t\t} else {\n+\t\t\t\tSystem.out.println(\"入力した区間幅は積分区間をオーバーしています\");\n+\t\t\t}\n+\t\t} else {\n+\t\t\tSystem.out.println(\"0.0より大きい小数を入力して下さい\");\n+\t\t}\n+\t}\n+\n+\t/**\n+\t * 台形の公式による定積分計算\n+\t *\n+\t * @param secRange\n+\t *            入力された区間幅\n+\t * @return sum 積分区間の面積\n+\t */\n+\tprivate static double calculateDefiniteIntegral(double secRange) {\n+\t\tdouble sum = 0.0;\n+\t\tdouble start = 0.0;\n+\t\t// 台形の公式「(上底 + 下底) * 高さ / 2」を分割数分繰り返す\n+\t\tfor (double end = 0.0; end <= 1.0; end = end + secRange) {","path":"Mondai/src/jp/ditgroup/algorithm/DefiniteIntegral.java","position":44,"original_position":44,"commit_id":"be3b0d218f39e80079785840825896c932d228d8","original_commit_id":"3a522f8c72940b39fa0bff513294ade0a481a443","user":{"login":"kovayashi","id":5044650,"avatar_url":"https://avatars.githubusercontent.com/u/5044650?v=3","gravatar_id":"","url":"https://api.github.com/users/kovayashi","html_url":"https://github.com/kovayashi","followers_url":"https://api.github.com/users/kovayashi/followers","following_url":"https://api.github.com/users/kovayashi/following{/other_user}","gists_url":"https://api.github.com/users/kovayashi/gists{/gist_id}","starred_url":"https://api.github.com/users/kovayashi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kovayashi/subscriptions","organizations_url":"https://api.github.com/users/kovayashi/orgs","repos_url":"https://api.github.com/users/kovayashi/repos","events_url":"https://api.github.com/users/kovayashi/events{/privacy}","received_events_url":"https://api.github.com/users/kovayashi/received_events","type":"User","site_admin":false},"body":"いや、いいです理解しているなら大丈夫、\r\nごめんなさい！\r\n\r\nなんていうか、嫌っているって人にムカついた・・\r\n\r\n","created_at":"2016-08-15T02:27:16Z","updated_at":"2016-08-15T02:27:16Z","html_url":"https://github.com/a3095194/algorithm/pull/11#discussion_r74715489","pull_request_url":"https://api.github.com/repos/a3095194/algorithm/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/a3095194/algorithm/pulls/comments/74715489"},"html":{"href":"https://github.com/a3095194/algorithm/pull/11#discussion_r74715489"},"pull_request":{"href":"https://api.github.com/repos/a3095194/algorithm/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/a3095194/algorithm/pulls/11","id":78572624,"html_url":"https://github.com/a3095194/algorithm/pull/11","diff_url":"https://github.com/a3095194/algorithm/pull/11.diff","patch_url":"https://github.com/a3095194/algorithm/pull/11.patch","issue_url":"https://api.github.com/repos/a3095194/algorithm/issues/11","number":11,"state":"open","locked":false,"title":"DefiniteIntegral<修正>","user":{"login":"a3095194","id":15305615,"avatar_url":"https://avatars.githubusercontent.com/u/15305615?v=3","gravatar_id":"","url":"https://api.github.com/users/a3095194","html_url":"https://github.com/a3095194","followers_url":"https://api.github.com/users/a3095194/followers","following_url":"https://api.github.com/users/a3095194/following{/other_user}","gists_url":"https://api.github.com/users/a3095194/gists{/gist_id}","starred_url":"https://api.github.com/users/a3095194/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a3095194/subscriptions","organizations_url":"https://api.github.com/users/a3095194/orgs","repos_url":"https://api.github.com/users/a3095194/repos","events_url":"https://api.github.com/users/a3095194/events{/privacy}","received_events_url":"https://api.github.com/users/a3095194/received_events","type":"User","site_admin":false},"body":"この課題のメインではないのでロジックにMath.pow()を使用","created_at":"2016-07-23T13:49:18Z","updated_at":"2016-08-15T02:27:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b30308c49af3871822e26eaec324b72bd38b43f6","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/a3095194/algorithm/pulls/11/commits","review_comments_url":"https://api.github.com/repos/a3095194/algorithm/pulls/11/comments","review_comment_url":"https://api.github.com/repos/a3095194/algorithm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/a3095194/algorithm/issues/11/comments","statuses_url":"https://api.github.com/repos/a3095194/algorithm/statuses/be3b0d218f39e80079785840825896c932d228d8","head":{"label":"a3095194:task8","ref":"task8","sha":"be3b0d218f39e80079785840825896c932d228d8","user":{"login":"a3095194","id":15305615,"avatar_url":"https://avatars.githubusercontent.com/u/15305615?v=3","gravatar_id":"","url":"https://api.github.com/users/a3095194","html_url":"https://github.com/a3095194","followers_url":"https://api.github.com/users/a3095194/followers","following_url":"https://api.github.com/users/a3095194/following{/other_user}","gists_url":"https://api.github.com/users/a3095194/gists{/gist_id}","starred_url":"https://api.github.com/users/a3095194/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a3095194/subscriptions","organizations_url":"https://api.github.com/users/a3095194/orgs","repos_url":"https://api.github.com/users/a3095194/repos","events_url":"https://api.github.com/users/a3095194/events{/privacy}","received_events_url":"https://api.github.com/users/a3095194/received_events","type":"User","site_admin":false},"repo":{"id":44943501,"name":"algorithm","full_name":"a3095194/algorithm","owner":{"login":"a3095194","id":15305615,"avatar_url":"https://avatars.githubusercontent.com/u/15305615?v=3","gravatar_id":"","url":"https://api.github.com/users/a3095194","html_url":"https://github.com/a3095194","followers_url":"https://api.github.com/users/a3095194/followers","following_url":"https://api.github.com/users/a3095194/following{/other_user}","gists_url":"https://api.github.com/users/a3095194/gists{/gist_id}","starred_url":"https://api.github.com/users/a3095194/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a3095194/subscriptions","organizations_url":"https://api.github.com/users/a3095194/orgs","repos_url":"https://api.github.com/users/a3095194/repos","events_url":"https://api.github.com/users/a3095194/events{/privacy}","received_events_url":"https://api.github.com/users/a3095194/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/a3095194/algorithm","description":"アルゴリズムの課題","fork":false,"url":"https://api.github.com/repos/a3095194/algorithm","forks_url":"https://api.github.com/repos/a3095194/algorithm/forks","keys_url":"https://api.github.com/repos/a3095194/algorithm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/a3095194/algorithm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/a3095194/algorithm/teams","hooks_url":"https://api.github.com/repos/a3095194/algorithm/hooks","issue_events_url":"https://api.github.com/repos/a3095194/algorithm/issues/events{/number}","events_url":"https://api.github.com/repos/a3095194/algorithm/events","assignees_url":"https://api.github.com/repos/a3095194/algorithm/assignees{/user}","branches_url":"https://api.github.com/repos/a3095194/algorithm/branches{/branch}","tags_url":"https://api.github.com/repos/a3095194/algorithm/tags","blobs_url":"https://api.github.com/repos/a3095194/algorithm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/a3095194/algorithm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/a3095194/algorithm/git/refs{/sha}","trees_url":"https://api.github.com/repos/a3095194/algorithm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/a3095194/algorithm/statuses/{sha}","languages_url":"https://api.github.com/repos/a3095194/algorithm/languages","stargazers_url":"https://api.github.com/repos/a3095194/algorithm/stargazers","contributors_url":"https://api.github.com/repos/a3095194/algorithm/contributors","subscribers_url":"https://api.github.com/repos/a3095194/algorithm/subscribers","subscription_url":"https://api.github.com/repos/a3095194/algorithm/subscription","commits_url":"https://api.github.com/repos/a3095194/algorithm/commits{/sha}","git_commits_url":"https://api.github.com/repos/a3095194/algorithm/git/commits{/sha}","comments_url":"https://api.github.com/repos/a3095194/algorithm/comments{/number}","issue_comment_url":"https://api.github.com/repos/a3095194/algorithm/issues/comments{/number}","contents_url":"https://api.github.com/repos/a3095194/algorithm/contents/{+path}","compare_url":"https://api.github.com/repos/a3095194/algorithm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/a3095194/algorithm/merges","archive_url":"https://api.github.com/repos/a3095194/algorithm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/a3095194/algorithm/downloads","issues_url":"https://api.github.com/repos/a3095194/algorithm/issues{/number}","pulls_url":"https://api.github.com/repos/a3095194/algorithm/pulls{/number}","milestones_url":"https://api.github.com/repos/a3095194/algorithm/milestones{/number}","notifications_url":"https://api.github.com/repos/a3095194/algorithm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/a3095194/algorithm/labels{/name}","releases_url":"https://api.github.com/repos/a3095194/algorithm/releases{/id}","deployments_url":"https://api.github.com/repos/a3095194/algorithm/deployments","created_at":"2015-10-26T03:24:26Z","updated_at":"2016-01-22T07:15:22Z","pushed_at":"2016-08-13T14:46:42Z","git_url":"git://github.com/a3095194/algorithm.git","ssh_url":"git@github.com:a3095194/algorithm.git","clone_url":"https://github.com/a3095194/algorithm.git","svn_url":"https://github.com/a3095194/algorithm","homepage":null,"size":61,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":4,"forks":2,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"a3095194:master","ref":"master","sha":"60e7f9777ee0db070283e0c771e87e3029c3d288","user":{"login":"a3095194","id":15305615,"avatar_url":"https://avatars.githubusercontent.com/u/15305615?v=3","gravatar_id":"","url":"https://api.github.com/users/a3095194","html_url":"https://github.com/a3095194","followers_url":"https://api.github.com/users/a3095194/followers","following_url":"https://api.github.com/users/a3095194/following{/other_user}","gists_url":"https://api.github.com/users/a3095194/gists{/gist_id}","starred_url":"https://api.github.com/users/a3095194/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a3095194/subscriptions","organizations_url":"https://api.github.com/users/a3095194/orgs","repos_url":"https://api.github.com/users/a3095194/repos","events_url":"https://api.github.com/users/a3095194/events{/privacy}","received_events_url":"https://api.github.com/users/a3095194/received_events","type":"User","site_admin":false},"repo":{"id":44943501,"name":"algorithm","full_name":"a3095194/algorithm","owner":{"login":"a3095194","id":15305615,"avatar_url":"https://avatars.githubusercontent.com/u/15305615?v=3","gravatar_id":"","url":"https://api.github.com/users/a3095194","html_url":"https://github.com/a3095194","followers_url":"https://api.github.com/users/a3095194/followers","following_url":"https://api.github.com/users/a3095194/following{/other_user}","gists_url":"https://api.github.com/users/a3095194/gists{/gist_id}","starred_url":"https://api.github.com/users/a3095194/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a3095194/subscriptions","organizations_url":"https://api.github.com/users/a3095194/orgs","repos_url":"https://api.github.com/users/a3095194/repos","events_url":"https://api.github.com/users/a3095194/events{/privacy}","received_events_url":"https://api.github.com/users/a3095194/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/a3095194/algorithm","description":"アルゴリズムの課題","fork":false,"url":"https://api.github.com/repos/a3095194/algorithm","forks_url":"https://api.github.com/repos/a3095194/algorithm/forks","keys_url":"https://api.github.com/repos/a3095194/algorithm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/a3095194/algorithm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/a3095194/algorithm/teams","hooks_url":"https://api.github.com/repos/a3095194/algorithm/hooks","issue_events_url":"https://api.github.com/repos/a3095194/algorithm/issues/events{/number}","events_url":"https://api.github.com/repos/a3095194/algorithm/events","assignees_url":"https://api.github.com/repos/a3095194/algorithm/assignees{/user}","branches_url":"https://api.github.com/repos/a3095194/algorithm/branches{/branch}","tags_url":"https://api.github.com/repos/a3095194/algorithm/tags","blobs_url":"https://api.github.com/repos/a3095194/algorithm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/a3095194/algorithm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/a3095194/algorithm/git/refs{/sha}","trees_url":"https://api.github.com/repos/a3095194/algorithm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/a3095194/algorithm/statuses/{sha}","languages_url":"https://api.github.com/repos/a3095194/algorithm/languages","stargazers_url":"https://api.github.com/repos/a3095194/algorithm/stargazers","contributors_url":"https://api.github.com/repos/a3095194/algorithm/contributors","subscribers_url":"https://api.github.com/repos/a3095194/algorithm/subscribers","subscription_url":"https://api.github.com/repos/a3095194/algorithm/subscription","commits_url":"https://api.github.com/repos/a3095194/algorithm/commits{/sha}","git_commits_url":"https://api.github.com/repos/a3095194/algorithm/git/commits{/sha}","comments_url":"https://api.github.com/repos/a3095194/algorithm/comments{/number}","issue_comment_url":"https://api.github.com/repos/a3095194/algorithm/issues/comments{/number}","contents_url":"https://api.github.com/repos/a3095194/algorithm/contents/{+path}","compare_url":"https://api.github.com/repos/a3095194/algorithm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/a3095194/algorithm/merges","archive_url":"https://api.github.com/repos/a3095194/algorithm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/a3095194/algorithm/downloads","issues_url":"https://api.github.com/repos/a3095194/algorithm/issues{/number}","pulls_url":"https://api.github.com/repos/a3095194/algorithm/pulls{/number}","milestones_url":"https://api.github.com/repos/a3095194/algorithm/milestones{/number}","notifications_url":"https://api.github.com/repos/a3095194/algorithm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/a3095194/algorithm/labels{/name}","releases_url":"https://api.github.com/repos/a3095194/algorithm/releases{/id}","deployments_url":"https://api.github.com/repos/a3095194/algorithm/deployments","created_at":"2015-10-26T03:24:26Z","updated_at":"2016-01-22T07:15:22Z","pushed_at":"2016-08-13T14:46:42Z","git_url":"git://github.com/a3095194/algorithm.git","ssh_url":"git@github.com:a3095194/algorithm.git","clone_url":"https://github.com/a3095194/algorithm.git","svn_url":"https://github.com/a3095194/algorithm","homepage":null,"size":61,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":4,"forks":2,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/a3095194/algorithm/pulls/11"},"html":{"href":"https://github.com/a3095194/algorithm/pull/11"},"issue":{"href":"https://api.github.com/repos/a3095194/algorithm/issues/11"},"comments":{"href":"https://api.github.com/repos/a3095194/algorithm/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/a3095194/algorithm/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/a3095194/algorithm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/a3095194/algorithm/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/a3095194/algorithm/statuses/be3b0d218f39e80079785840825896c932d228d8"}}}}
{"actor":{"display_login":"kovayashi"}}