链接:https://ac.nowcoder.com/acm/contest/889/I
来源:牛客网
题目描述
输入N个M求
((KM)&M)mod(1e9+7)
输入描述:
The first and only line of input contains two space-separated integers, N, M (1 <= N <= 10^18, 1 <= M <= 10^11).
输出描述:
Output a single integer, the answer to the problem.
示例1
输入
4 6
输出
12
说明
The sum is 6 + 4 + 2 + 0 = 12.
题解:
算M每一个二进位上的贡献度,假设M二进制的第j位是1ÿ