hiho week 168 register

Ended

Participants:818

Verdict:Accepted
Score:100 / 100
Submitted:2017-09-22 10:53:31

Lang:Python2

Edit
1
2
3
4
5
6
7
8
9
10
def cal(n):
    if n==0:
        return 1
    if n%2==0:
        return cal(n/2)+cal(n/2-1)
    return cal(n/2)
x = int(raw_input())
print cal(x)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX