#include <stdio.h>

int alpha(int);


int main()

{

int result, a;

scanf("%d", &a);

result = alpha(a);

printf("%d\n", result);


return 0;

}


int alpha(int x)

{

int b, c=0 ,d=0;

for (b = 0; b < x; b++)

{

c += b + 1;

d += c;

}

return d;

}


a 입력받아서 a까지 1+(1+2)+(1+2+3)....하는건데


alpha함수부분 더 간단히 될수 있나요>?