My issue
what is missing or incorrect in the code
My code
// Update the code below to solve this problem
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--)
{
int N,X;
cin>>N>>X;
int income, amount;
income = pow(X,2);
int i = 1;
do{
amount = income - income/2;
income = income/2;
i++;
}while(i<=N);
cout<<amount<<endl;
}
return 0;
}
Learning course: Solve Programming problems using C++
Problem Link: CodeChef: Practical coding for everyone