当前位置:网站首页>Zzuli: cumulative sum of 1050 factorials
Zzuli: cumulative sum of 1050 factorials
2022-07-03 14:34:00 【Snake_____】
Title Description
seek 1! + 2! + ……n!
Input
Enter an integer n, You can assume that n No more than 10.
Output
Output an integer , That is, the result of factorial accumulation , Take a line alone .
The sample input Copy
4
Sample output Copy
33
#include <stdio.h>
int main()
{
int n,i,sum=0,mul=1;
scanf("%d",&n);
for(i=1;i<=n;i++)
{
mul=mul*i;
sum=sum+mul;
}
printf("%d",sum);
return 0;
}边栏推荐
- 适用于XP的DDK
- 表单文本框的使用(一) 选择文本
- 动态获取权限
- J-luggage lock of ICPC Shenyang station in 2021 regional games (simple code)
- 关于敏捷的一些概念
- C language,%d% Difference between 2D%2d%02d
- NFT new opportunity, multimedia NFT aggregation platform okaleido will be launched soon
- Bibit pharmaceutical rushed to the scientific innovation board: annual revenue of 970000, loss of 137million, proposed to raise 2billion
- 泰凌冲刺科创板:拟募资13亿 国家大基金与小米长江是股东
- Tonybot humanoid robot starts for the first time 0630
猜你喜欢

Four data flows and cases of grpc

Protobuf and grpc

Analysis of gene family characteristics - chromosome location analysis
![洛谷P5018 [NOIP2018 普及组] 对称二叉树 题解](/img/89/da1a3a38e02671628f385de0f30369.png)
洛谷P5018 [NOIP2018 普及组] 对称二叉树 题解

puzzle(016.3)千丝万缕

表单文本框的使用(一) 选择文本

NPM install is stuck with various strange errors of node NPY

GRPC的四种数据流以及案例

Tailing rushes to the scientific and Technological Innovation Board: it plans to raise 1.3 billion, and Xiaomi Changjiang is the shareholder

愉悦资本新双币基金近40亿元完成首次关账
随机推荐
Selective sorting
适用于XP的DDK
2021年区域赛ICPC沈阳站J-Luggage Lock(代码简洁)
ZABBIX saves the page blank after adding calculated items
adc128s022 ADC verilog设计实现
7-17 crawling worms (break exercise)
Get permissions dynamically
Time conversion ()
Find specified characters
Add ZABBIX calculation type itemcalculated items
Mysql多表查询 #子查询
Too many files with unapproved license
556. 下一个更大元素 III : 简单构造模拟题
剑指 Offer 28. 对称的二叉树
Analysis of gene family characteristics - chromosome location analysis
Preliminary summary of structure
Common commands for getting started with mongodb database
MongoDB数据库入门的常用命令
7-6 mixed type data format input
Tonybot humanoid robot starts for the first time 0630