Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

演習課題 #150

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

演習課題 #150

wants to merge 7 commits into from

Conversation

xxarupakaxx
Copy link

よろしくお願いします

Copy link

@nanashima nanashima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apple.c spear.c works.c が正しく動いていません.

src/apple.c Outdated Show resolved Hide resolved
src/apple.c Outdated Show resolved Hide resolved
src/spear.c Show resolved Hide resolved
src/works.c Outdated

return 0;
}

unsigned int p(int x)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

原因までは特定してないですが,資料中のケースでも正しく動いてません.

@xxarupakaxx
Copy link
Author

レビューありがとうございます
今mainの前にp を定義しました

Copy link

@nanashima nanashima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apple spearが境界値で正しい答えを返していないです.初期値を確認してください.
worksは資料中のケースでも正しい答えを返していないです.

src/apple.c Outdated
scanf("%d", &A[i]);
}

int lb = 0;
int ub = 100000000;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

足りないです

src/spear.c Outdated
scanf("%d", &A[i]);
}

int lb = 0;
int ub = 100000000;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

初期値が不適切です

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修正しましたありがとうございます

src/works.c Outdated
scanf("%d", &A[i]);
}

int lb = 0;
int ub = 100000000;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ここも足りないです.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修正しましたありがとうございます

src/works.c Outdated
sum += A[i] / x;
}

return sum < k;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spear?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修正しましたありがとうございます

@xxarupakaxx
Copy link
Author

修正しましたありがとうございます

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants