rev='made'/> name='keywords'/> name='author'/> ANURANAN: UVa Solution 10170: The Hotel with Infinite Rooms

Welcome Note

Hi,
I'm Anisuzzaman Babla . I am a full stack Android Application Developer. I am working with Android for more than two years. I have completed my graduation from IIT, Jahangirnagar University. I have developed a series of commercially successful apps on Android. Moreover, 10+ of my Apps are live at Google play store. .
Thank You

UVa Solution 10170: The Hotel with Infinite Rooms

#include<stdio.h>
int main()
{
long s,d,i,n;
while(scanf("%ld%ld",&s,&d)==2)
{
n=0;
for(i=s;;i++)
{
n=n+i;
if(n>d || n==d)
{
printf("%ld\n",i);
break;
}
}
}
return 0;
}

1 comment:

  1. If you looking for a cheap hotel in nice. Check our amazing nice hotel deals now & save with our price match guarantee. Book online today at Cox Bazar Hotels

    ReplyDelete