wxy2016 @ 2016-08-06 15:48:33
#include<cstdio>
#include<cstdlib>
#include<iostream>
using namespace std;
int main()
{
int k,a,ans=0,c;
int i;
scanf("%d",&k);
for(i=1;;i++)
{
a=i*i;
ans=ans+a;
c=(i*i+i)/2;
if(c<k) continue;
else break;
}
printf("%d",ans);
return 0;
}
by bqxtt @ 2016-08-06 17:06:36
你这个考虑天数不完全啊
by nuclear @ 2016-09-14 23:42:27
我是打表
by 菊花有点麻 @ 2016-10-15 20:41:51