454,915 Members | 1,268 Online
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,915 IT Pros & Developers. It's quick & easy.

# Race problem

 P: 2 "race N cars are lined up at the starting line of a Formula 1 race. Task Write a program that determines in how many ways the cars can pass the finish line, knowing that there may be more than one car arriving at the same time. Input Data Input file race.in contains a single line which has positive integer N on it. Output Data Output file race.out will contain a single line with the number of ways the cars can pass the finish line. Restrictions 1 <= N <= 100 Examples race.in race.out Explanation 2 3 1st way: the two cars pass the finish line in order 1, 2 2nd way: the two cars pass the finish line in order 2, 1 3rd way: the cars pass the finish line at the same time." The algoritm i believe can be resolved mathematically, although the formula I haven't discovered yet. If you can help send the answer at: puscas_marinar@yahoo.com Jan 2 '07 #1