ecnerwala / cp-book

Book Code for Competitive Programming
Creative Commons Zero v1.0 Universal
550 stars 64 forks source link

Added mod_constraint test and fixed mod_constraint #11

Closed devin-ai-integration[bot] closed 5 months ago

devin-ai-integration[bot] commented 5 months ago

This PR removes extra debugging print statements from modnum.test.cpp and adjusts the calculation in modnum.hpp to ensure a non-negative value for 'extra' during the modulus operation.