编程介的小学生 2019-05-13 15:23 采纳率: 20.5%
浏览 111

一个路线的运算求解的问题,怎么采用C程序编写代码的技术方法去实现的呢?

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
5 4
1 1
0 0

Sample Output
126
2

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 求差集那个函数有问题,有无佬可以解决
    • ¥15 MATLAB动图问题
    • ¥15 【提问】基于Invest的水源涵养
    • ¥20 微信网友居然可以通过vx号找到我绑的手机号
    • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
    • ¥15 解riccati方程组
    • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
    • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
    • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
    • ¥50 树莓派安卓APK系统签名