现在的位置: 首页 > 综合 > 正文

uva10055

2013年10月10日 ⁄ 综合 ⁄ 共 518字 ⁄ 字号 评论关闭

 Volume
0. Getting Started

第一题:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=94&page=show_problem&problem=996

/****************************************************
Author: LuckyQueen
time: 2011.11.28    11:49
Problem solution: 就是b - a 不过wa好多次 因为我认为b>a
                  其实不一定
*****************************************************/

#include <iostream>
#include <cstdlib>
#include <cstdio>
using namespace std;

int main()
{
    long long a, b;
    while (scanf("%lld%lld", &a, &b) != EOF)
    {
        printf("%lld\n", (b-a)>0?(b-a):(a-b));
    }
    return 0;
}

LuckyQueen is the best!!!

抱歉!评论已关闭.