int main()
{
int n, k;
cin >> n >> k;
long long res = 0;
int cnt = 0;
int mask = 1;
while (mask < k)
{
if (k&mask)
{
res += pow(n, cnt);
}
cnt++;
mask = (mask << 1);
}
cout << res << endl;
system("pause");
return 0;
}
百分之90,难受