Help me in solving ANTITRI problem

My issue

failed on third test case

Problem Link: https://www.codechef.com/problems/ANTITRI

@godkiller99
plzz refer my c++ code for better understanding .
Note : - plzz keep in mind that all elements of the array should not be greater than 10^9.

#include <iostream>
using namespace std;

int main() {
	// your code goes here
	int t;
	cin>>t;
	while(t--)
	{
	    long long int n,l;
	    cin>>n>>l;
	    if(l>=1000000)
	    {
	        for(int i=1;i<=n;i++)
	        {
	            cout<<i<<" ";
	        }
	    }
	    else
	    {
	        cout<<1<<" ";
	        int pre=1;
	        for(int i=1;i<n;i++)
	        {
	            cout<<pre+l<<" ";
	            pre+=l;
	        }
	    }
	    cout<<endl;
	}
	return 0;
}