|
|
back to boardpython wrong answer help 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 # 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 # 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 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 |
|
|