What's wrong in this? How to do this question using power of 11?


#1

How I can correct it?, (Problem in storing double digit in the array…)
vector solve(int A) {
vector result;

  long long int num = pow(11, A-1);
  while(num>=0){
        long long int x = num%10;
        result.push_back(x);
        num = num/10;
  }
  for (auto i: result)
        cout<<i;
  return result;

}

For A : 5

Actual Output: 1 5 0 1 6 1

But the expected output is : 1 5 10 10 5 1