Wednesday, February 6, 2008

Hashmat the Brave Warrior : Problem No. 10055

Solution submitted with Run Time = 1.210

#include<iostream>
#include<cmath>

using namespace std;

int main()
{
long long m,n;

while(cin>>m>>n)
{
if((m-n)>0)
cout<<m-n<<endl;
else
cout<<n-m<<endl;
}

return 0;
}

Comment for better algorithm.

No comments: