PROGRAMMING PROBLEMS & SOLUTIONS
Pages
HOME
URI
UVA
CODEFORCES
HACKERRANK
EXTRA
CONTACT
Friday, April 29, 2016
UVA problem 10055 – Hashmat the Brave Warrior
Problem link (Click here)
#include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
int main()
{
long long i, j, d;
while(cin >> i){
cin >> j;
if(i>j)
swap(i,j);
cout << j-i <<endl;
}
return 0;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment