ps:立方和公式:1^3 + 2^3 + …… n^3 = [n (n+1) / 2]^2=(1+2+……+n)^2
#include<stdio.h> void main() { int n; int sum; while(scanf("%d",&n)!=EOF) { n=n000; sum=(((n*(n+1)/2)000)*((n*(n+1)/2)000))000; printf("d\n",sum); } }
ps:立方和公式:1^3 + 2^3 + …… n^3 = [n (n+1) / 2]^2=(1+2+……+n)^2
#include<stdio.h> void main() { int n; int sum; while(scanf("%d",&n)!=EOF) { n=n000; sum=(((n*(n+1)/2)000)*((n*(n+1)/2)000))000; printf("d\n",sum); } }