当前位置:网站首页>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
边栏推荐
- Is online futures account opening safe and reliable? Which domestic futures company is better?
- Add IDM to Google browser
- Résumé des outils communs et des points techniques de l'examen PMP
- Setting methods, usage methods and common usage scenarios of environment variables in postman
- Basé sur... Netcore Development blog Project Starblog - (14) Implementation of theme switching function
- Site favorites
- PHP database connection succeeded, but data cannot be inserted
- Amélioration de l'efficacité de la requête 10 fois! 3 solutions d'optimisation pour résoudre le problème de pagination profonde MySQL
- 选择排序与冒泡排序模板
- POSTECH | option compatible reward reverse reinforcement learning
猜你喜欢

PID of sunflower classic

Don't disagree, this is the most powerful "language" of the Internet

JVM family -- monitoring tools

Unity knapsack system (code to center and exchange items)
![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]

JVM family -- heap analysis

Problems and solutions of several concurrent scenarios of redis

I stepped on a foundation pit today
![[Wu Enda deep learning] beginner learning record 3 (regularization / error reduction)](/img/e9/818bdfeae766dca7d2318b52b4424d.jpg)
[Wu Enda deep learning] beginner learning record 3 (regularization / error reduction)

Imperial cms7.5 imitation "D9 download station" software application download website source code
随机推荐
Management and thesis of job management system based on SSM
Love and self-discipline and strive to live a core life
system information
System integration meets the three business needs of enterprises
150 ppt! The most complete "fair perception machine learning and data mining" tutorial, Dr. AIST Toshihiro kamishima, Japan
super_ Subclass object memory structure_ Inheritance tree traceability
Webhook triggers Jenkins for sonar detection
I stepped on a foundation pit today
Constantly changing harmonyos custom JS components during the Spring Festival - Smart Koi
Unspeakable Prometheus monitoring practice
How to use websocket to realize simple chat function in C #
MySQL is dirty
Webhook triggers Jenkins for sonar detection
The "message withdrawal" of a push message push, one click traceless message withdrawal makes the operation no longer difficult
[PaddleSeg 源码阅读] PaddleSeg计算 mIoU
MySQL backup notes
JVM family -- heap analysis
Enhanced for loop
Résumé des outils communs et des points techniques de l'examen PMP
Hospital network planning and design document based on GLBP protocol + application form + task statement + opening report + interim examination + literature review + PPT + weekly progress + network to