标签:
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1408
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 14968 Accepted Submission(s):
3645
1 #include <stdio.h> 2 #include<math.h> 3 int main() 4 { 5 int i,t,s; 6 double d,v,n; 7 while(scanf("%lf%lf",&v,&d)!=EOF) 8 { 9 n=v/d; 10 s=0; 11 for(i=1; s+i<n; i++) 12 s+=i; 13 i+=ceil(n)-1; 14 printf("%d\n",i); 15 } 16 return 0; 17 }
标签:
原文地址:http://www.cnblogs.com/qq-star/p/4622929.html