Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- long int s,d,i,n;
- while(scanf("%ld%ld",&s,&d)==2)
- {
- n=0;
- for(i=s;;i++)
- {
- n=n+i;
- if(n>=d)
- {
- printf("%ld\n",i);
- break;
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement