Programming contests

ACM ICPC programozó csapatverseny, házi forduló, 2015. október 21.

October 21, 2015, 10:00 AM – October 21, 2015, 3:00 PM

Hashmat, the Brave Warrior

Hashmat is a brave warrior who, with his group of young soldiers, moves from one place to another to fight against his opponents. Before fighting, he just calculates one thing, the difference between the number of his soldiers and the number of the opponent's soldiers. From this difference, he decides whether to fight or not.

Input Specification

The input contains two numbers in each line. These two numbers denote the number of soldiers in Hashmat's army and his opponent's army or vice versa. The input numbers are not greater than 232. The input is terminated by end of file (EOF).

Output Specification

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

Sample Input

  1. 10 12
  2. 10 14
  3. 100 200
download as text file

Output for Sample Input

  1. 2
  2. 4
  3. 100
download as text file
University of Debrecen; Faculty of Informatics; v. 09/30/2024