1391A - Suborrays

Click to show code.


using namespace std;
int main(void)
{
    int t, n;
    cin >> t;
    while (t--)
    {
        cin >> n;
        for (int i = 1; i <= n; ++i)
            cout << i << " ";
        cout << endl;
    }
    return 0;
}