题目链接
模拟
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main()
{
//freopen("input.txt", "r", stdin);
long long a, k;
while (scanf("%lld%lld", &a, &k) != EOF) {
for (;;) {
long long b = a / 2 + k;
if (b == a)
{
cout << b << endl;
break;
}
a = b;
}
}
}