由 Lucas 定理知,答案为 $2^{\mathrm{popcount}(K-1)}$,其中 $\mathrm{popcount}(x)$ 表示 $x$ 二进制表示中的 $1$ 的个数。
QOJ.ac
QOJ
Discussion #334 for Problem #6804. Gaokao
Type: Editorial
Status: Open
Posted by: jiangly
Posted at:
Last updated:
题解
Comments
No comments yet.
Type: Editorial
Status: Open
Posted by: jiangly
Posted at:
Last updated:
由 Lucas 定理知,答案为 $2^{\mathrm{popcount}(K-1)}$,其中 $\mathrm{popcount}(x)$ 表示 $x$ 二进制表示中的 $1$ 的个数。