Problem Type : Super Easy
#include<stdio.h>
main()
{
long int x,sum;
while((scanf("%ld",&x))==1)
{
sum=(x*(x+1)/2)*(x*(x+1)/2);
printf("%ld\n",sum);
}
return 0;
}
#include<stdio.h>
main()
{
long int x,sum;
while((scanf("%ld",&x))==1)
{
sum=(x*(x+1)/2)*(x*(x+1)/2);
printf("%ld\n",sum);
}
return 0;
}
No comments:
Post a Comment