baekjoon 20260216
This commit is contained in:
parent
27ae010fdf
commit
0e715c9c81
10
code_study/Baekjoon/python/2921.py
Normal file
10
code_study/Baekjoon/python/2921.py
Normal file
@ -0,0 +1,10 @@
|
||||
N = int(input())
|
||||
|
||||
sigma = lambda k : int(0.5*k*(k+1))
|
||||
|
||||
ans = 0
|
||||
for n in range(1,N+1) :
|
||||
if n==1 : ans = 3
|
||||
else : ans += sigma(n) + n*(n+1)
|
||||
|
||||
print(ans)
|
||||
Loading…
x
Reference in New Issue
Block a user