daily pastebin goal
31%
SHARE
TWEET

Задача 1

a guest Oct 22nd, 2018 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main(){
  5.     int a, b;
  6.     cin >> a >> b;
  7.     if (a % 2 == 0)
  8.         cout << (b - a + 1) / 2;
  9.  
  10.     else
  11.         cout << (b - a) / 2;
  12.     return 0;
  13. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top