Unformatted text preview: ing the rear wheel always spins faster than the pedals. Your input will consist of multiple data sets, one per line. Each set will contain a single real number greater than one and less than six indicating the number of times the rear wheel should spin for each revolution of the pedals. Your output for each data set should be two integers on a single line. The first integer is the number of gears on the pedal gearwheel and the second integer is the number of gears on the rear wheel gearwheel, such that the ratio between these two values is the closest possible to the given input ratio. If multiple possible combinations of gears yield the same ratio, select the pair with the smallest total number of gears. p Sample input: 3 3.04 2.41 Sample output: 48 16 76 25 70 29...
View
Full
Document
This note was uploaded on 04/29/2011 for the course IT 201 taught by Professor K.v.arya during the Spring '11 term at IIT Kanpur.
 Spring '11
 k.v.arya

Click to edit the document details