您的位置:首页 > 其它

HDOJ   2551   竹青遍野

2015-12-18 18:08 483 查看
题目:http://acm.hdu.edu.cn/showproblem.php?pid=2551

#include <stdio.h>

#include <math.h>

int main()

{

int
T,n,i;


scanf("%d",&T);


while(T--)

{


scanf("%d",&n);


for(i=1;i<=1000;i++)


{


n-=pow(i,3);


if(n<=0)


{


printf("%d\n",i);


break;


}


}

}

return
0;

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: