You are viewing a single comment's thread. Return to all comments →
Can anybody suggest for an optimised function to chck for terminating part I tried as:
bool check_terminating(int deno) { while (true) { if (deno % 5 == 0) deno /= 5; else break; } while (true) { if (deno % 2 == 0) deno /= 2; else break; } if (deno > 1) return false; return true; }
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #183: Maximum product of parts
You are viewing a single comment's thread. Return to all comments →
Can anybody suggest for an optimised function to chck for terminating part I tried as: