当前位置:网站首页>Class summation, shortest row
Class summation, shortest row
2022-07-04 03:33:00 【Yueyechong】
import math
d=0
n=int(input())
for i in range(n+1):
d+=math.factorial(i)
print(d)math.factorial() Directly calculate the hierarchical value , If you really can't remember or understand, use this first
import math
d=1
n=int(input())
for i in range(1,n+1):
j=1
for b in range(1,i+1):
j*=b# Multiply internal loops
d+=j
print(d)There is no function call
边栏推荐
- Easy to win insert sort
- System integration meets the three business needs of enterprises
- Rhcsa day 2
- The difference between MCU serial communication and parallel communication and the understanding of UART
- Summary of Chinese remainder theorem
- [development team follows] API specification
- 1day vulnerability pushback skills practice (3)
- I stepped on a foundation pit today
- 2022 examination summary of quality controller - Equipment direction - general basis (quality controller) and examination questions and analysis of quality controller - Equipment direction - general b
- @Scheduled scheduled tasks
猜你喜欢
![Backpropagation formula derivation [Li Hongyi deep learning version]](/img/ef/f76eae39c4f8716a0030a60c85b09c.gif)
Backpropagation formula derivation [Li Hongyi deep learning version]

false sharing

If you have just joined a new company, don't be fired because of your mistakes

MySQL is dirty

Is it really so difficult to learn redis? Today, a fan will share his personal learning materials!

What is the difference between enterprise wechat applet and wechat applet

Jenkins configures IP address access

In my spare time, I like to write some technical blogs and read some useless books. If you want to read more of my original articles, you can follow my personal wechat official account up technology c

7 * 24-hour business without interruption! Practice of applying multiple live landing in rookie villages

Explain AI accelerator in detail: why is this the golden age of AI accelerator?
随机推荐
Webhook triggers Jenkins for sonar detection
Redis transaction
[database I] database overview, common commands, view the table structure of 'demo data', simple query, condition query, sorting data, data processing function (single row processing function), groupi
What is cloud primordial?
Zlmediakit compilation and webrtc push-pull flow testing
MySQL backup notes
96% of the collected traffic is prevented by bubble mart of cloud hosting
Slurm view node configuration information
Audio and video technology development weekly | 232
In my spare time, I like to write some technical blogs and read some useless books. If you want to read more of my original articles, you can follow my personal wechat official account up technology c
The first spring of the new year | a full set of property management application templates are presented, and Bi construction is "out of the box"
Stm32bug [the project references devices, files or libraries that are not installed appear in keilmdk]
7 * 24-hour business without interruption! Practice of applying multiple live landing in rookie villages
Practical multifunctional toolbox wechat applet source code / support traffic master
Rhcsa day 3
WordPress collection WordPress hang up collection plug-in
MySQL data query optimization -- data structure of index
logistic regression
Management and thesis of job management system based on SSM
Site favorites