Can someone tell me why this is a partially correct answer?


#1

int Solution::power(string A) {
if(A.size()==1 && A[0]-‘0’<2) return 0;
char buffer[128];
stringstream str(A);
str >> buffer;
__int128_t x = atoi(buffer);
if((x&(x-1)) == 0) return 1;
return 0;
}