Hito 1259 A Math Problem [北京ICPC K.A Math Problem]

正文索引 [隐藏]

传送门:http://hihocoder.com/problemset/problem/1259
题面:http://media.hihocoder.com/contests/icpcbeijing2015/problems.pdf

题解

( F\left [ n \right ]=\sum_{i=0 }^{\infty}\left (n\&\left ( 1<<i \right )\right )\times 3^{i} )
然后数位DP即可

代码