Skip to content

Fix/atcoder memory notation change #173

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

himoooooono
Copy link

what

#172 について、メモリ表記と、計算値を変更しました。
KB→KiB (byte * 1000 → byte * 1024)
MB→MiB(byte * 1000 * 1000 → byte * 1024 * 1024)
あったらごめんなさいなのですが、このプロジェクト内ではテスト時の[INFO]max memory: ○○MiB
を出力する箇所が見つけられなかったのでこの範囲の変更のみ行っています。

why

  • AtCoderProblemDataを呼び出した際にAssertionErrorで動作が止まるため
  • メモリ制限の表記変更に伴い、内部的な計算も変化するため

お手すきの際に確認していただけると幸いです。

if tds[3].text.endswith(' KiB'):
memory_limit_byte = int(float(utils.remove_suffix(tds[3].text, ' KiB')) * 1024)
elif tds[3].text.endswith(' MiB'):
memory_limit_byte = int(float(utils.remove_suffix(tds[3].text, ' MiB')) * 1024 * 1024) # TODO: confirm this is MB truly, not MiB
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
memory_limit_byte = int(float(utils.remove_suffix(tds[3].text, ' MiB')) * 1024 * 1024) # TODO: confirm this is MB truly, not MiB
memory_limit_byte = int(float(utils.remove_suffix(tds[3].text, ' MiB')) * 1024 * 1024)

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