牛客网——E进阶吧阶乘
2024-09-05 09:30:43
链接:https://www.nowcoder.net/acm/contest/75/E
来源:牛客网
时间限制:C/C++ 3秒,其他语言6秒
空间限制:C/C++ 32768K,其他语言65536K
64bit IO Format: %lld
空间限制:C/C++ 32768K,其他语言65536K
64bit IO Format: %lld
题目描述
给定一个整数N(0≤N≤10000),求取N的阶乘
输入描述:
多个测试数据,每个测试数据输入一个数N
输出描述:
每组用一行输出N的阶乘
输入例子:
1
2
3
输出例子:
1
2
6
-->
示例1
输入
1
2
3
输出
1
2
6
while True:
try:
n = int(input())
ans = 1
for i in range(1,n+1):
ans = ans * i
print(ans)
except:
break
好气啊,用py,比赛时没想到。
最新文章
- C++ 引用计数技术及智能指针的简单实现
- sql语句查询
- 如何通过JDBC访问数据库
- echarts.js 做图表的插件
- PEP8 Python 编码规范
- [Aaronyang] 写给自己的WPF4.5 笔记[3MenuItem中的icon]
- #Javascript:this用法整理
- sentos nginx安装
- laravel where中多条件查询
- web页面的生命周期
- readelf -s 命令‘symbol’名字显示不全
- [LeetCode] Cut Off Trees for Golf Event 为高尔夫赛事砍树
- Django网站制作
- 追逐心目中的那个Ta
- java实现随机四则运算
- Sublime Text3 配置 NodeJs 开发环境
- Elasticsearch tshark 封包分析 (转)
- 【Codeforces 204E】Little Elephant and Strings
- canvas扩散圆环
- [原]windows sdk版本不对
热门文章
- Educational Codeforces Round 28
- This module embeds Lua, via LuaJIT 2.0/2.1, into Nginx and by leveraging Nginx's subrequests, allows the integration of the powerful Lua threads (Lua coroutines) into the Nginx event model.
- Oil Skimming---hdu4185(最大匹配)
- python 面向对象 类 __doc__
- android showDialog用法
- Windows Server 2008 R2(X64) MSDN镜像简体中文版与英文版ISO下载及Key激活码
- 常用linux shell脚本记录
- SpringBoot 通过自定义注解实现AOP切面编程实例
- hdu5880 Family View
- ng-深度学习-课程笔记-17: 序列模型和注意力机制(Week3)