当前位置:网站首页>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;
}边栏推荐
- NFT新的契机,多媒体NFT聚合平台OKALEIDO即将上线
- JVM garbage collector
- Creation of data table of Doris' learning notes
- tonybot 人形机器人 查看端口并对应端口 0701
- Sendmail无法发送邮件及发送过慢解决
- 556. 下一个更大元素 III : 简单构造模拟题
- Showmebug entered Tencent conference, opening the era of professional technical interview
- C language,%d% Difference between 2D%2d%02d
- Plane vector addition
- ShowMeBug入驻腾讯会议,开启专业级技术面试时代
猜你喜欢

Programming language: the essence of type system

Puzzle (016.4) domino effect

基因家族特征分析 - 染色体定位分析

tonybot 人形机器人 红外遥控玩法 0630

愉悦资本新双币基金近40亿元完成首次关账

Niuke: crossing the river

Polestar美股上市:5.5万台交付如何支持得起超200亿美元估值

x86汇编语言-从实模式到保护模式 笔记

Comprehensive evaluation of good-looking, easy-to-use and powerful handwriting note taking software: notability, goodnotes, marginnote, handwriting, notes writers, collanote, collanote, prodrafts, not

亚马逊、速卖通、Lazada、Shopee、eBay、wish、沃尔玛、阿里国际、美客多等跨境电商平台,测评自养号该如何利用产品上新期抓住流量?
随机推荐
7-4 BCD decryption (10 points)
别再问自己适不适合做软件测试了
7-1 positive integer a+b (15 points)
Get permissions dynamically
Although not necessarily the best, it must be the hardest!
How to query the baby category of tmall on Taobao
Common shortcut keys in PCB
String sort
tonybot 人形机器人 红外遥控玩法 0630
Pyqt interface production (login + jump page)
MongoDB数据库入门的常用命令
7-3 count the number of words in a line of text
Convert string to decimal integer
Analysis of gene family characteristics - chromosome location analysis
Tonybot humanoid robot infrared remote control play 0630
retrofit
556. 下一个更大元素 III
分布式事务(Seata) 四大模式详解
7-10 stack of hats (25 points) (C language solution)
7-17 crawling worms (break exercise)