Hackerrank power-sum problem

below is my code of the problem


i have not able to pass the last test case . please help

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
ll fastexp(ll a,ll n){
if(n==0){
return 1;
}
ll r=fastexp(a,n/2);
if(n%2==0){
return (rr);
}
else{
return (r
a*r);
}
}
ll co=0;
void calc(ll a[],ll x,ll n,ll i,ll sum,ll ss){
if(i==ss){
//cout<<" h “<<i<<” "<<sum<<endl;
if(sum==x){
co++;
}
return;
}

calc(a,x,n,i+1,sum+a[i],ss);
calc(a,x,n,i+1,sum,ss);
}
int main(){
ll x,n;
cin>>x>>n;
ll ss=sqrt(x);
ll a[ss+1];ll j=0;
for(ll i=1;i<=ss;i++){
a[j]=fastexp(i,n);
j++;
}

calc(a,x,n,0,0,ss);

cout<<co<<endl;

}