#include <iostream>
#include <cmath>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char *argv[]) {
int n=111*111*111;
cout<<n<<endl;
for(int i=1;i<=n;i+=2)
{
int k=n;
for(int j=i;k>0;j+=2)
{
k-=j;
}
if(k==0)
cout<<i<<endl;
}
return 0;
}
//371
/*
标题:连续奇数和
小明看到一本书上写着:任何数字的立方都可以表示为连续奇数的和。
比如:
2^3 = 8 = 3 + 5
3^3 = 27 = 7 + 9 + 11
4^3 = 64 = 1 + 3 + ... + 15
虽然他没有想出怎么证明,但他想通过计算机进行验证。
请你帮助小明写出 111 的立方之连续奇数和表示法的起始数字。如果有多个表示方案,选择起始数字小的方案。
请严格按照要求,通过浏览器提交答案。
注意:只提交一个整数,不要写其它附加内容,比如:说明性的文字。
*/