https://cn.vjudge.net/problem/36676/origin这里写链接内容
#include<stdio.h>
#include<stdlib.h>
int main()
{
double v,d;
int n;
while(~scanf("%lf%lf",&v,&d))
{
int sum=0;
n=v/d;
if((v/d-n)!=0)
{
sum=n+1;
}
else sum=n;
// printf("sum=%d\n",sum);
int sum1=0;
int i;
for(i=1;i<=sum;i++)
{
sum1+=i;
// printf("%d 1 \n",i);
if(sum1*d>=v)break;
}
sum+=i-1;
printf("%d\n",sum);
}
return 0;
}