ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1402. Cocktails

accepted
Posted by Mikhail 16 May 2018 01:33
ans = 0
n = int(input())
for i in range(2, n + 1) :
    cur = 1
    for j in range(n - i + 1, n + 1) :
        cur = cur * j
    ans = ans + cur
print(ans)

///////////
на С++ переполняется, нужно длинку писать