Advertisement
MiinaMagdy

12468 - Zapping

Sep 1st, 2022
983
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. #define ll long long
  6. #define endl '\n'
  7. #define sz(x) int(x.size())
  8. #define all(x) x.begin(), x.end()
  9.  
  10. int main() {
  11.     ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  12.     int a, b;
  13.     while (scanf("%d %d", &a, &b), ~a && ~b) {
  14.         cout << min(100 - abs(a - b), abs(a - b)) << endl;
  15.     }
  16.     return 0;
  17. }
  18.  
Tags: UVA CP3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement