Advertisement
w31c0m32h311

pizdec dolgo delal 16

Jun 17th, 2022
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.20 KB | None | 0 0
  1. def f(n):
  2.     if n<2: return 1
  3.     if n >= 2 and n%3 == 0: return f(n/3)+1
  4.     if n >= 2 and n%3!=0: return f(n-2)+5
  5.  
  6. k = 0
  7. for i in range(1, 100000):
  8.     if f(i) == 55:
  9.         k = k+1
  10. print(k)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement