Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<math.h>
- int main()
- {
- long long n,t,x;
- t=1;
- while(scanf("%lld",&n)==1)
- {
- if(n==0)
- break;
- x=ceil((3+sqrt(9+8*n))/2);
- printf("Case %lld: %lld\n",t++,x);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement