10055 - Hashmat the Brave Warrior

#include<stdio.h>
#include<string.h>
#include<math.h>
#include<algorithm>
using namespace std;
//typedef __int64 lld;
typedef long long lld;
int main()
{
    lld n,m,ans;
    //while(scanf("%I64d%I64d",&n,&m)!=EOF)
    while(scanf("%lld%lld",&n,&m)!=EOF)
    {
        if(m>n)
            ans=m-n;
        else
            ans=n-m;
        //printf("%I64d\n",ans);
        printf("%lld\n",ans);
    }
    return 0;
}

题意是32位整数,所以要使用64位整数表示。

posted @ 2014-07-22 21:38  varcom  阅读(142)  评论(0编辑  收藏  举报