|Contests||Virtual Contests||Problems||Submit||Runs Status||Rank List||Forum|
The 2006 FIFA World Cup Final was held in Berlin, Germany on July 9th, 2006, with France against Italy. Both France and Italy are the conquerors of the European soccer field. Soccer fans from all over the world came to Berlin Olympic Stadium to celebrate this world's biggest soccer party. In front of the ticket booth outside the stadium, we observed something interesting:
The ticket for the final match costs $50. There are m fans in the line having only $50 bill and n fans having only $100 bill. The ticket booth does not hold any changes. Please calculate in how many ways can these (m+n) soccer fans all get their tickets without the ticket booth running out of changes.
Every pair of data consists of two non-negative integers m, n(not exceed 300), separated by a space. The last line of the input is a line containing two zeros.
For every pair of data, output the number of ways the fans could line up.
We assume no difference between fans other than the type of bills they hold. For example, in Sample 3, there is only one way for three people to line up if all of them have $50 bill.Author: Wtommy