Add tests for math (#31)#32
Merged
Merged
Conversation
KATO-Hiro
commented
Sep 23, 2020
|
|
||
|
|
||
| def floor_sum(n: int, m: int, a: int, b: int) -> int: | ||
| assert 1 <= n |
Contributor
Author
There was a problem hiding this comment.
公式リポジトリのドキュメントを読み、n, mに関する制約条件の判定が抜けているように思いましたので、assertを追加しました(公式リポジトリも同様)。公式リポジトリで制約条件の緩和が検討されており、この対応を受けて修正するのがよさそうでしょうか?
また、本PRで述べるか迷いましたが、公式ドキュメントの式・制約条件から、nの下限値が0ではなく1であるように思います。いかがお考えでしょうか?(私の理解不足・誤解の可能性が高いと思いますが・・・)。ACL Practice ContestのC問題の制約条件では、nの下限値が1となっており、判断に迷っています。
…python into features/test_math
Contributor
Author
WHAT型チェックを追加いたしました。 |
Owner
|
遅くなってすいません。マージします。 |
Closed
Contributor
Author
|
レビューとマージをしていただきありがとうございます。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@not522 さん
WHAT