Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
2109 张弛 将任何一个正整数的立方写成一组相邻奇数之和 C++ 通过 100 0 MS 256 KB 180 2019-11-08 18:47:26

Tests(9/9):


#include<iostream> using namespace std; int main(){ int a,b,c,d; cin>>a; b=a*a*a; c=(a*a-a+1)+(a-1)*2; for(;d<b;c=c-2){ printf("%d ",c); d=d+c; } return 0; }


测评信息: