当前位置:网站首页>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
边栏推荐
- [PaddleSeg 源码阅读] PaddleSeg计算Dice
- Session learning diary 1
- Résumé des outils communs et des points techniques de l'examen PMP
- Apple submitted the new MAC model to the regulatory database before the spring conference
- POSTECH | option compatible reward reverse reinforcement learning
- Résumé: entropie, énergie libre, symétrie et dynamique dans le cerveau
- Recent learning fragmentation (14)
- Formulaire day05
- Li Chuang EDA learning notes 13: electrical network for drawing schematic diagram
- Want to do something in production? Then try these redis commands
猜你喜欢

基于PHP的轻量企业销售管理系统

What is the difference between enterprise wechat applet and wechat applet

Have you entered the workplace since the first 00???

Package details_ Four access control characters_ Two details of protected

Typical applications of minimum spanning tree

No clue about the data analysis report? After reading this introduction of smartbi, you will understand!

logistic regression

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?

Résumé: entropie, énergie libre, symétrie et dynamique dans le cerveau
![[source code analysis] model parallel distributed training Megatron (5) -- pipestream flush](/img/94/2bdc31ec05595dbbc8a7a8d6b22252.jpg)
[source code analysis] model parallel distributed training Megatron (5) -- pipestream flush
随机推荐
How about the ratings of 2022 Spring Festival Gala in all provinces? Map analysis helps you show clearly!
I stepped on a foundation pit today
Unspeakable Prometheus monitoring practice
Contest3145 - the 37th game of 2021 freshman individual training match_ J: Eat radish
The property of judging odd or even numbers about XOR.
MySQL data query optimization -- data structure of index
Solve the problems encountered by the laravel framework using mongodb
Short math guide for latex by Michael downs
How to use STR function of C language
This function has none of DETERMINISTIC, NO SQL..... (you *might* want to use the less safe log_bin_t
[PaddleSeg 源码阅读] PaddleSeg 自定义数据类
Fudan released its first review paper on the construction and application of multimodal knowledge atlas, comprehensively describing the existing mmkg technology system and progress
Don't disagree, this is the most powerful "language" of the Internet
Which product is better if you want to go abroad to insure Xinguan?
Summary of Chinese remainder theorem
[Valentine's Day confession code] - Valentine's Day is approaching, and more than 10 romantic love effects are given to the one you love
Setting methods, usage methods and common usage scenarios of environment variables in postman
Typical applications of minimum spanning tree
Base d'apprentissage de la machine: sélection de fonctionnalités avec lasso
Dare to climb here, you're not far from prison, reptile reverse actual combat case