Combinatorics problem !!

Правка en1, от __fn__, 2023-12-07 14:04:34

You are given an integer $$$n \leq 10^9$$$. Your task is to compute the number of ways $$$n$$$ can be expressed as the sum of even numbers. Since the answer could be very large, compute it modulo $$$10^9 + 7$$$.

Sample : $$$n = 8$$$

$$$8 = 6 + 2$$$

$$$8 = 4 + 4$$$

$$$8 = 4 + 2 + 2$$$

$$$8 = 2 + 2 + 2 + 2$$$

Therefore for $$$n = 8$$$ the answer would be $$$4$$$

Do anyone know how to solve this problem? Comment on the solution

Теги problem, combinatorics

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en5 Английский __fn__ 2023-12-12 14:45:44 670 Tiny change: 'ith $n < 2*10^5$\n</s' -> 'ith $n < 2.10^5$\n</s'
en4 Английский __fn__ 2023-12-07 17:20:22 23 Tiny change: ' + 7$.\n\n**Samp' -> ' + 7$.\n\n$Time limit : 1s$\n\n**Samp'
en3 Английский __fn__ 2023-12-07 14:47:59 0 (published)
en2 Английский __fn__ 2023-12-07 14:45:50 16 (saved to drafts)
en1 Английский __fn__ 2023-12-07 14:04:34 447 Initial revision (published)