Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- long long int mini(long long int left,long long int right)
- {
- if(left>=right)
- return right;
- else
- return left;
- }
- long long int maxi(long long int left,long long int right)
- {
- if(left<=right)
- return right;
- else
- return left;
- }
- int main()
- {
- long long int left,right,power,mn,mx,a,b,c,d,e;
- scanf("%lld %lld %lld",&left,&right,&power);
- mn=mini(left,right);
- mx=maxi(left,right);
- a=mx-mn;
- b=a/2;
- c=a%2;
- if(c==1)
- {
- printf("Khelbo Na\n");
- }
- else
- {
- if(b<=power)
- printf("%lld\n",b);
- else
- printf("Khelbo Na\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement