当前位置:网站首页>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
边栏推荐
- Contest3145 - the 37th game of 2021 freshman individual training match_ J: Eat radish
- Site favorites
- MySQL is dirty
- Setting methods, usage methods and common usage scenarios of environment variables in postman
- What kind of experience is it when the Institute earns 20000 yuan a month!
- what does ctrl + d do?
- Defensive programming skills
- I stepped on a foundation pit today
- There is no need to authorize the automatic dream weaving collection plug-in for dream weaving collection
- Rhcsa day 2
猜你喜欢

Explain AI accelerator in detail: why is this the golden age of AI accelerator?
![[Valentine's Day confession code] - Valentine's Day is approaching, and more than 10 romantic love effects are given to the one you love](/img/ab/066923f1aa1e8dd8dcc572cb60a25d.jpg)
[Valentine's Day confession code] - Valentine's Day is approaching, and more than 10 romantic love effects are given to the one you love

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?

New year's first race, submit bug reward more!

Redis transaction

1day vulnerability pushback skills practice (3)

Jenkins continuous integration environment construction V (Jenkins common construction triggers)

MySQL is dirty

Www 2022 | taxoenrich: self supervised taxonomy complemented by Structural Semantics

This function has none of DETERMINISTIC, NO SQL..... (you *might* want to use the less safe log_bin_t
随机推荐
[PaddleSeg 源码阅读] PaddleSeg计算Dice
7 * 24-hour business without interruption! Practice of applying multiple live landing in rookie villages
PID of sunflower classic
warning: LF will be replaced by CRLF in XXXXXX
Base d'apprentissage de la machine: sélection de fonctionnalités avec lasso
Monitoring - Prometheus introduction
Package and download 10 sets of Apple CMS templates / download the source code of Apple CMS video and film website
What is cloud primordial?
functools下的reduce函数
Management and thesis of job management system based on SSM
Constantly changing harmonyos custom JS components during the Spring Festival - Smart Koi
SQL injection (1) -- determine whether there are SQL injection vulnerabilities
CSCI 2134
96% of the collected traffic is prevented by bubble mart of cloud hosting
This function has none of DETERMINISTIC, NO SQL..... (you *might* want to use the less safe log_bin_t
[source code analysis] model parallel distributed training Megatron (5) -- pipestream flush
Jenkins configures IP address access
Sword finger offer:55 - I. depth of binary tree
Explain AI accelerator in detail: why is this the golden age of AI accelerator?
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