USTC-ACM-Prob1013

Normally, a backtrace method is enough to solve the problem.
here is another dynamic method provided by google search engine.
USTC-ACM-Prob1014

/**
* Solve it using the standard equation, that a smaller difference should
be reached
* each time.
* Be careful about the output format and extreme cases.
* Either one is zero, second is the factor of the first one, equal.
* Take of the case of ceil and floor function when the argument is
integer
* itself.
*/
USTC-ACM-Prob1018

/**
* Normal method.
*/