ABC-340
A
解法
B
解法
C
https://atcoder.jp/contests/dp/tasks/dp_a
#DP
Python
@cachedef f(x): return 0 if x==1 else f((x//2))+f((x+1)//2) + x
def solve(): N = Integer().content print(f(N))
解法
D
解法
E
https://atcoder.jp/contests/dp/tasks/dp_a
#DP
Python
@cachedef f(x): return 0 if x==1 else f((x//2))+f((x+1)//2) + x
def solve(): N = Integer().content print(f(N))