Skip to content

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

2 participants