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