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