【题意简述】:由The drive ratio -- the ratio of the angular velocity of the pedals to that of the wheels -- isn : m where n is the number of teeth on the rear sprocket andm is the number of teeth on the front sprocket. Two drive ratios d1< d2 are adjacent if there is no other drive ratio d1 < d3 < d2. The spread between a pair of drive ratiosd1 < d2 is their quotient: d2 ?d1. You are to compute the maximum spread between two adjacent drive ratios achieved by a particular pair of front and rear clusters.我们可以知道,这个ratios等于n/m,然后d(从1……n)就是每一个ratios的值,现在让我们求最大的di/d(i-1)的值。
【分析】:有些题就是这样,只要我们理解了题意就可以很快的A掉,但如果不理解题意,就……
代码借鉴:http://www.cnblogs.com/eric-blog/archive/2011/06/01/2067441.html