Advertisement
rahat62

Toph-Odd or Even

Jan 30th, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.21 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     long long int N,result;
  5.     scanf("%lld",&N);
  6.  
  7.     if(N%2==0)
  8.         result=N/2;
  9.     else
  10.         result=(N+1)/2;
  11.  
  12.     printf("%lld\n",result);
  13.  
  14.     return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement