当前位置:网站首页>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
边栏推荐
- Future源碼一觀-JUC系列
- system information
- Recent learning fragmentation (14)
- Slurm view node configuration information
- [UE4] parse JSON string
- 【.NET+MQTT】.NET6 環境下實現MQTT通信,以及服務端、客戶端的雙邊消息訂閱與發布的代碼演示
- [PaddleSeg 源码阅读] PaddleSeg计算Dice
- CUDA basic knowledge
- Unity controls the selection of the previous and next characters
- [.NET + mqtt]. Mise en œuvre de la communication mqtt dans l'environnement net 6 et démonstration de code pour l'abonnement et la publication de messages bilatéraux du serveur et du client
猜你喜欢

选择排序与冒泡排序模板

Dare to climb here, you're not far from prison, reptile reverse actual combat case
![[PaddleSeg 源码阅读] PaddleSeg 自定义数据类](/img/88/37c535b371486db545abc392a685af.png)
[PaddleSeg 源码阅读] PaddleSeg 自定义数据类

Want to do something in production? Then try these redis commands
![Backpropagation formula derivation [Li Hongyi deep learning version]](/img/ef/f76eae39c4f8716a0030a60c85b09c.gif)
Backpropagation formula derivation [Li Hongyi deep learning version]
![Stm32bug [the project references devices, files or libraries that are not installed appear in keilmdk]](/img/0d/7a8370d153a8479b706377c3487220.jpg)
Stm32bug [the project references devices, files or libraries that are not installed appear in keilmdk]

MySQL is dirty

Explain AI accelerator in detail: why is this the golden age of AI accelerator?

What kind of experience is it when the Institute earns 20000 yuan a month!

Webhook triggers Jenkins for sonar detection
随机推荐
SQL injection (1) -- determine whether there are SQL injection vulnerabilities
Easy to win insert sort
潘多拉 IOT 开发板学习(HAL 库)—— 实验6 独立看门狗实验(学习笔记)
Management and thesis of job management system based on SSM
Rhcsa day 2
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
2022 registration examination for safety production management personnel of fireworks and firecracker production units and examination skills for safety production management personnel of fireworks an
Redis notes (I) Linux installation process of redis
static hostname; transient hostname; pretty hostname
Command Execution Vulnerability - command execution - vulnerability sites - code injection - vulnerability exploitation - joint execution - bypass (spaces, keyword filtering, variable bypass) - two ex
[PaddleSeg 源码阅读] PaddleSeg 自定义数据类
Day05 錶格
7 * 24-hour business without interruption! Practice of applying multiple live landing in rookie villages
[.NET + mqtt]. Mise en œuvre de la communication mqtt dans l'environnement net 6 et démonstration de code pour l'abonnement et la publication de messages bilatéraux du serveur et du client
Audio and video technology development weekly | 232
Imperial cms7.5 imitation "D9 download station" software application download website source code
Jenkins configures IP address access
[PaddleSeg 源码阅读] PaddleSeg Transform 的 Normalize操作
2022 attached lifting scaffold worker (special type of construction work) free test questions and attached lifting scaffold worker (special type of construction work) examination papers 2022 attached