Help me in solving CPPFALL334 problem

My issue

include
using namespace std;

int main() {
int T;
cin >> T; // Number of test cases

while (T--) {
    int N, X;
    cin >> N >> X;

    // Total income
    int total_income = 2 * X;

    // Deduct expenses iteratively
    int remaining = total_income;
    for (int i = 0; i < N; i++) {
        remaining = remaining / 2;
    }

    // Remaining income is Chef's savings
    cout << remaining << endl;
}

return 0;

}

My code

#include <iostream>
using namespace std;

int main() {
    int T;
    cin >> T; // Number of test cases

    while (T--) {
        int N, X;
        cin >> N >> X;

        // Total income
        int total_income = 2 * X;

        // Deduct expenses iteratively
        int remaining = total_income;
        for (int i = 0; i < N; i++) {
            remaining = remaining / 2;
        }

        // Remaining income is Chef's savings
        cout << remaining << endl;
    }

    return 0;
}

Learning course: Learn Programming and Problem Solving using C++
Problem Link: https://www.codechef.com/learn/course/sit-cpp-fall/SITFALL51/problems/CPPFALL334