[求助]HALP
http://acm.zju.edu.cn/show_problem.php?pid=2345#include<stdio.h>
main()
{
int a,b,c,i,j,f,d,e,p;
while(scanf("%d",&a)!=EOF)
{
getchar();
getchar();
p=a;
while(p)
{
while(scanf("%d",&b)!=EOF)
{ if(b==0){p--;break;}
printf("%d ",b);
c=0;f=1;d=0;
for(i=1;;i++)
{
for(j=1;j<=i;j++)
{
d=d+i;
c++;
if(c==b){f=0;break;}
}
if(f==0)break;
}
printf("%d\n",d);
}
}
printf("\n");
if(p==0)break;
}
}