Alexandre_lsv

Untitled

Mar 19th, 2016
318
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. typedef long long ll;
  5. typedef long double ld;
  6.  
  7. int main(){
  8.     cin.sync_with_stdio(false);
  9.     cout.sync_with_stdio(false);
  10.     ll a, b, c;
  11.     cin >> a >> b;
  12.     cout << a+b << endl;
  13.     cout << a*b << endl;
  14.     if (b==0)
  15.         cout << "Na nol' delit' nel'zya!!!" << endl;
  16.     else{
  17.         cout << (a%b==0|a>0?a/b:b>0?a/b-1:a/b+1) << endl;
  18.         cout << (a-b*(a%b==0|a>0?a/b:b>0?a/b-1:a/b+1))%b << endl;
  19.         cout << (((a-b*(a%b==0|a>0?a/b:b>0?a/b-1:a/b+1))%b)+(a%b==0|a>0?a/b:b>0?a/b-1:a/b+1)*b==a);
  20.     }
  21.     return 0;
  22. }
Add Comment
Please, Sign In to add comment