厉害的小学生可以推出来的题目
http://acm.zju.edu.cn/show_problem.php?pid=1629 。。。。。。。。。推出了一点点,然后用循环。。。。。。 不能吧 #include<stdio.h>
int main()
{
int a={0};
int m;
int n;
int i,j;
int d;
a=1;a=5;a=13;
for(i=4;i<=500;i++)
{
for(d=0,m=3;m<=i;m+=2)
{
d+=(i-m);
}
a=a+(2*i-1)+(i*(i-1))/2+d;
}
while(scanf("%d",&n)!=-1)
{
printf("%d%c",a,10);
}
} GOOD 楼上哪里的?
页:
[1]