L1-013. 计算阶乘和
来源:互联网 发布:淘宝天猫内部券公众号 编辑:程序博客网 时间:2024/06/05 06:58
#include<iostream>#include<set>#include<vector>#include<algorithm>#include<cmath>#include<cstring>using namespace std;int mp[200];//打表typedef unsigned long long ll;ll vp[20];ll cal(ll a){ ll b=1; for(ll i=1;i<=a;i++) b=b*i; return b; }void pre(){ vp[0]=0; for(int i=1;i<=10;i++){ ll val=cal(i); vp[i]=vp[i-1]+val; }} int main(){ pre(); int a; cin>>a; cout<<vp[a]<<endl; return 0;}
0 0
- L1-013. 计算阶乘和
- L1-013. 计算阶乘和
- L1-013. 计算阶乘和
- L1-013. 计算阶乘和
- L1-013. 计算阶乘和
- L1-013. 计算阶乘和
- L1-013. 计算阶乘和
- L1-013. 计算阶乘和
- L1-013. 计算阶乘和
- L1-013. 计算阶乘和
- L1-013. 计算阶乘和 Java
- ACM天梯赛练习L1-013. 计算阶乘和
- 团队天梯赛L1-013. 计算阶乘和
- 团体程序设计天梯赛-练习集L1-013. 计算阶乘和
- L1-013. 计算阶乘和-PAT团体程序设计天梯赛GPLT
- 1127 -- 计算阶乘和
- 计算阶乘和
- 计算阶乘和
- 我的算法8
- GPS信号结构
- iOS——UITableView
- java访问权限
- 前端js怎么实现文件下载
- L1-013. 计算阶乘和
- java中几中常见的排序方式汇总及二分法查找
- oracle忘记密码与解锁用户
- poj 2255 Tree Recovery (二叉树的顺序遍历)
- 恢复eclipse 视图格式
- 2017年华为实习生招聘笔试题1
- 排列
- 蓝桥杯 地宫取宝
- Cf 406 A. The Monster