[c++] C++ Best way to get integer division and remainder