|
||||||||||
Cry£¬men£¬not crimeTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1087 Accepted Submission(s): 179 Problem Description Cry£¬men£¬not crime------When I was a child ever, people around me told me not to tear. When I am a man now, I said to the mirror not to regret anything. See the figure below£¬please calculate how many paths are there on a grid where each step of the path consists of moving one unit to the right or one unit up, which from left-down to right-up. It is a simple problem, isn¡¯t it ? If you can¡¯t solve it, please cry, although you are a man, nobody will laugh at you, it is not crime ! Input The input contains several test cases. Each is specified by two integers n and m, denoting the size of the rectangle. As you can observe, the number of lines of the corresponding grid is one more in each dimension. Input is terminated by n=m=0. Output For each test case , calculate how many paths are there on a grid where each step of the path consists of moving one unit to the right or one unit up? You may safely assume that this number fits into a 32-bit unsigned integer. Sample Input
Sample Output
Author WhereIsHeroFrom Source | ||||||||||
|