阶乘......上帝的代码是什么? [英] factorial....God what is the code??
本文介绍了阶乘......上帝的代码是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我认为这不对!!!!
展开 | 选择 | Wrap | 行号
解决方案
i认为这不对!!!!
展开 | 选择 | Wrap | 行号
您应该知道factorial的公式。它是什么?
i认为这是:如果用户输入5,结果是:5 * 4 * 3 * 2 * 1和120的产品
i认为这是:如果用户输入5,结果是:5 * 4 * 3 * 2 * 1和它的乘积是120
正确。现在概括一下。
给定任何整数n,n的唯一因子是什么?
i think this is not right!!!!
Expand|Select|Wrap|Line Numbers解决方案i think this is not right!!!!
Expand|Select|Wrap|Line Numbers
You should know the formula for factorial. What is it?i think this is: if the user inputs 5, the result is: 5*4*3*2*1 and the product of that which is 120
i think this is: if the user inputs 5, the result is: 5*4*3*2*1 and the product of that which is 120Correct. Now generalize it.
Given any integer n, what is the factorial of n in terms of n only?
这篇关于阶乘......上帝的代码是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文登录 关闭
扫码关注1秒登录发送“验证码”获取 | 15天全站免登陆