提供一下我的思路1,代码如下long n, sum;for ( int i=1; i<=2n; i++ ){if( i%2 == 1 )sum += i * i;else sum += i * i * i;}//注释:最后输出 sum 即可