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 1366. Presents

python wrong answer help
Posted by akidra_8881 21 Aug 2020 08:54
import itertools
surprize =[]
x = int(input())
while x > 1:
    x -= 1
    surprize.append(x)
print (len(list(itertools.permutations (surprize))))
Re: python wrong answer help
Posted by akidra_8881 23 Aug 2020 07:59
# n = (n - 1) * ((n - 1) + (n - 2))
surprise = []


def f():
    number = int(input())
    number = (number - 1) * ((number - 1) + (number - 2))
    surprise.append(number)


f()
print(surprise[0]//3)

Edited by author 23.08.2020 08:05

Edited by author 04.09.2020 14:21

Edited by author 04.09.2020 14:21
Re: python wrong answer help
Posted by akidra_8881 26 Aug 2020 09:53
# wrong answer 11
def F(n):
    if n<2:
        return 1
    return n*F(n-1)
n = int(input())
print (int((F(n)+1)//2.718281828459045))
Re: python wrong answer help
Posted by Levon Oganesyan 27 Aug 2020 12:50
Try this formula f(n) = (n-1)*(f(n-1)+f(n-2)) ;)

Edited by author 27.08.2020 12:50

Edited by author 27.08.2020 12:50