My issue
What is wrong if we directly print an AP starting with first term L and common difference as L.
My code
#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
// your code goes here
int t;cin>>t;
while(t--){
ll n,l;
cin>>n>>l;
ll a[n];
for(int i=0;i<n;i++)
a[i]=l*(i+1);
for(int i=0;i<n;i++)
cout<<a[i]<<" ";
cout<<endl;
}
}
Problem Link: Anti-Triangle Practice Coding Problem - CodeChef