diff options
Diffstat (limited to 'contests/Codechef_Starters_41/D/main.cpp')
| -rwxr-xr-x | contests/Codechef_Starters_41/D/main.cpp | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/contests/Codechef_Starters_41/D/main.cpp b/contests/Codechef_Starters_41/D/main.cpp deleted file mode 100755 index a0365c2..0000000 --- a/contests/Codechef_Starters_41/D/main.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include<bits/stdc++.h> -#include <cmath> - -using namespace std; - -int main () { - ios_base::sync_with_stdio(false); - cin.tie(NULL); - int tt; - cin >> tt; - while(tt--){ - int x, y; - cin >> x >> y; - if(x > y) { - if((x - y) % 2 == 0) { - cout << (x - y) / 2 << endl; - } else { - cout << (x - y) / 2 + 2 << endl; - } - } else if (y > x) { - cout << y - x << endl; - } else { - cout << 0 << endl; - } - } -} |
