913-24 guruh Dasturlash amaliyot #1
Contest Problems
Problem Tasks
# | Date | State |
---|
Not Contest
# | Date | State |
---|
H. Funksiya7
Time limit : 1000 ms
Memory limit : 64 mb
$f(n)$ funksiyasi quyidagicha hisoblanadi:
$$\text{f(0) = 0, f(1) = 1, f(2n) = f(n), f(2n+1) = f(n) + f(n+1)}$$
Kiruvchi ma`lumotlar: $n$ natural son ($1\le n \le 2147483647$)
Chiquvchi ma`lumotlar: Masala yechimi $f(n)$ ni chiqaring
Input |
---|
2 |
Output |
1 |
Input |
---|
5 |
Output |
3 |