UVa 10055 Hashmat the Brave Warrior (Water ver.)

Source: Internet
Author: User

10055-hashmat the Brave Warrior

Time limit:3.000 seconds

Http://uva.onlinejudge.org/index.php? option=com_onlinejudge&itemid=8&category=94&page=show_problem&problem=996

Hashmat is a brave warrior, who and his group, young soldiers moves-I-another to fight-against his oppon Ents. Before fighting he just calculates one thing, the difference between his soldier number and the opponent ' s soldier number. From the difference he decides whether to fight or not. Hashmat ' s soldier number is never greater than his opponent.

Input

The input contains two integer numbers in every line. These two numbers in each line denotes the number of soldiers in Hashmat ' s army and his opponent ' s army or vice versa. The input numbers are not greater than 2^32. The Input is terminated by the end of File.

Output

For each line of input, print the difference of number of soldiers between Hashmat ' s army and his opponent ' s army. Each output should is in the seperate line.

Sample Input:

10 12

10 14

100 200

Sample Output:

2

4

100

Note that the order of two numbers is not sequential.

/*0.062s*/
  
#include <cstdio>
#include <cstdlib>
  
int main (void)
{
    Long long num1, num2;
    while (~SCANF ("%lld%lld", &num1, &num2))
        printf ("%lld\n", Llabs (num1-num2));
    return 0;
}

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/Programming/sjjg/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.