当前位置:网站首页>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
边栏推荐
- GUI Graphical user interface programming (XIV) optionmenu - what do you want your girlfriend to wear on Valentine's day
- super_ Subclass object memory structure_ Inheritance tree traceability
- 潘多拉 IOT 开发板学习(HAL 库)—— 实验6 独立看门狗实验(学习笔记)
- (column 23) typical C language problem: find the minimum common multiple and maximum common divisor of two numbers. (two solutions)
- Dare to climb here, you're not far from prison, reptile reverse actual combat case
- Contest3145 - the 37th game of 2021 freshman individual training match_ F: Smallest ball
- Recent learning fragmentation (14)
- Site favorites
- Base d'apprentissage de la machine: sélection de fonctionnalités avec lasso
- warning: LF will be replaced by CRLF in XXXXXX
猜你喜欢

National standard gb28181 protocol platform easygbs fails to start after replacing MySQL database. How to deal with it?

Zhihu million hot discussion: why can we only rely on job hopping for salary increase? Bosses would rather hire outsiders with a high salary than get a raise?

Session learning diary 1

GUI Graphical user interface programming (XIV) optionmenu - what do you want your girlfriend to wear on Valentine's day
![[source code analysis] model parallel distributed training Megatron (5) -- pipestream flush](/img/98/3e5f1094141e34d7e77f908e12acda.jpg)
[source code analysis] model parallel distributed training Megatron (5) -- pipestream flush

(column 23) typical C language problem: find the minimum common multiple and maximum common divisor of two numbers. (two solutions)

Package details_ Four access control characters_ Two details of protected

Easy to win insert sort
![[PaddleSeg 源码阅读] PaddleSeg 自定义数据类](/img/88/37c535b371486db545abc392a685af.png)
[PaddleSeg 源码阅读] PaddleSeg 自定义数据类

Www 2022 | taxoenrich: self supervised taxonomy complemented by Structural Semantics
随机推荐
Keepalived set the master not to recapture the VIP after fault recovery (it is invalid to solve nopreempt)
Typical applications of minimum spanning tree
WordPress collection WordPress hang up collection plug-in
Code Execution Vulnerability - no alphanumeric rce create_ function()
CUDA basic knowledge
[PaddleSeg 源码阅读] PaddleSeg计算Dice
Solve the problems encountered by the laravel framework using mongodb
what does ctrl + d do?
7 * 24-hour business without interruption! Practice of applying multiple live landing in rookie villages
Teach you how to optimize SQL
Zblog collection plug-in does not need authorization to stay away from the cracked version of zblog
投资深度思考
1day vulnerability pushback skills practice (3)
Leetcode51.n queen
Setting methods, usage methods and common usage scenarios of environment variables in postman
機器學習基礎:用 Lasso 做特征選擇
[.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
Jenkins continuous integration environment construction V (Jenkins common construction triggers)
The "message withdrawal" of a push message push, one click traceless message withdrawal makes the operation no longer difficult
Dare to climb here, you're not far from prison, reptile reverse actual combat case