题解 | #阶乘#

阶乘

https://www.nowcoder.com/practice/39fcf876fab34fe8afc298de10a1e112

{"html":"<!-- 请在此处编写你的代码 -->\\n<!-- <div id=\"app\"> Hello Nowcoder </div> -->","css":"/* html, body {\\n\\twidth: 100%;\\n\\theight: 100%;\\n\\tmargin: 0;\\n\\tpadding: 0;\\n} */","js":"function _factorial(number) {\r\n    // 补全代码\r\n  for(i=number;i>=0;i--){\r\n    if(i==0){\r\n        return 0\r\n    }\r\n    if(i==1){\r\n        return 1\r\n    }\r\n    return number *=number-1\r\n  }\r\n}"}
全部评论

相关推荐

06-20 16:12
门头沟学院 Java
rakkaus:助学金,,,这个就不用写吧
点赞 评论 收藏
分享
07-24 19:01
门头沟学院 Java
后天笔试,又要开始做题了
Sairus:明天10:00笔试
投递京东等公司10个岗位
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务