当前位置:网站首页>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
边栏推荐
- How to use STR function of C language
- Easy to win insert sort
- Keepalived set the master not to recapture the VIP after fault recovery (it is invalid to solve nopreempt)
- How to pipe several commands in Go?
- 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
- Aperçu du code source futur - série juc
- CSP drawing
- Zigzag scan
- No clue about the data analysis report? After reading this introduction of smartbi, you will understand!
- Zblog collection plug-in does not need authorization to stay away from the cracked version of zblog
猜你喜欢

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

Lichuang EDA learning notes 14: PCB board canvas settings

Tsinghua University product: penalty gradient norm improves generalization of deep learning model

Li Chuang EDA learning notes 13: electrical network for drawing schematic diagram

Package and download 10 sets of Apple CMS templates / download the source code of Apple CMS video and film website

Consul of distributed service registration discovery and unified configuration management

Constantly changing harmonyos custom JS components during the Spring Festival - Smart Koi

Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?

Why is it recommended that technologists write blogs?

Third party login initial version
随机推荐
Zblog collection plug-in does not need authorization to stay away from the cracked version of zblog
How about the ratings of 2022 Spring Festival Gala in all provinces? Map analysis helps you show clearly!
GUI Graphical user interface programming (XIV) optionmenu - what do you want your girlfriend to wear on Valentine's day
Lichuang EDA learning notes 14: PCB board canvas settings
機器學習基礎:用 Lasso 做特征選擇
Eh, the log time of MySQL server is less than 8h?
Is it really so difficult to learn redis? Today, a fan will share his personal learning materials!
查詢效率提昇10倍!3種優化方案,幫你解决MySQL深分頁問題
Contest3145 - the 37th game of 2021 freshman individual training match_ F: Smallest ball
1day vulnerability pushback skills practice (3)
Command Execution Vulnerability - command execution - vulnerability sites - code injection - vulnerability exploitation - joint execution - bypass (spaces, keyword filtering, variable bypass) - two ex
Webhook triggers Jenkins for sonar detection
POSTECH | option compatible reward reverse reinforcement learning
Leetcode51.n queen
Recent learning fragmentation (14)
Nbear introduction and use diagram
Add IDM to Google browser
Short math guide for latex by Michael downs
Contest3145 - the 37th game of 2021 freshman individual training match_ E: Eat watermelon
WP collection plug-in free WordPress collection hang up plug-in