[Solved] Rephrase pascal code to c++ so it can work as efficient as possible
Restate problem: 1) Compute F = largest proper factor of X 2) Output X-F Instead of directly searching for the largest proper factor, apply three trivial optimizations (maybe something more advanced will be needed, but first see if three trivial optimizations are enough). A) Find S = smallest factor of X greater than 1. Output … Read more