Irregular Is Tough, Regular Is Easy!

Dr. Bari is working on some chemical formation. He believes that chemicals and shapes that are regul…

Click here to read the complete problem statement.


If you need help solving this problem, mention your approach and ask specific questions. Please avoid sharing your code and asking the Community to figure out “what’s wrong”.

#include <stdio.h>

int main() {
long long int N,i,d,T,j,p=0,k;
scanf(“%lld”,&T);
for(j=1;j<=T;j++)
{
scanf(“%lld”,&N);
if(N<=3)
printf(“%lld”,&p);
else{
d=2;
for(i=5,k=3;i<=N;i++,k++)
{
d=d+k;
}
printf(“%lld\n”,d);
}
}
return 0;
}
Whats the problem with this code?

Why u used &p ,in print function?