| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 5484 | 黄祖耀 | 将任何一个正整数的立方写成一组相邻奇数之和 | C++ | Accepted | 100 | 0 MS | 248 KB | 185 | 2020-08-05 07:00:19 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,m=0,sum=0; cin>>n; m=n*n-n+1+2*(n-1); while(sum!=n*n*n){ sum+=m; cout<<m<<' '; m-=2; } return 0; }