zhx的课,代码95分求调
#include<bits/stdc++.h>
#define gt getchar
#define pt putchar
typedef unsigned long long ll;
using namespace std;
inline bool pts(char ch){return ch>=48&&ch<=57;}
inline ll read(){
bool f=0;ll x=0;char ch;
ch=gt();
while(!pts(ch)&&ch!=EOF){if(ch=='-')f=1;ch=gt();}
while(pts(ch)){x*=10;x+=(ch-48);ch=gt();}
if(f)return -x;
else return x;
}
inline void print(ll x){
char s[114];
int top=0;
if(x<0)pt('-');
do{
top++;
if(x>=0)s[top]=(x%10)+48;
else s[top]=(-(x%10)+48);
x/=10;
}while(x);
while(top){pt(s[top]);top--;}
}
ll num[1919];
ll ans=0;
signed main(){
ll n=read();
int k=read();
for(register int i=k;i<=64;i++)
num[i]=0;
//num[i]代表x^a 这种形式的数 被算了几次
for(register int i=k;i<=64;i++){
//pow(x,y) = x^y
//pow(x,0.5) = sqrt(x)
ll v=floor(pow(n,1.0/i)-1);
int d=1-num[i];
ans+=v*d;
for(int j=i;j<=64;j+=i)
num[j]+=d;
}
print(ans+1);
return 0;
}