UVa 10055 Hashmat the brave warrior(勇士)
来源:互联网 发布:斗鱼刷人气软件那个好 编辑:程序博客网 时间:2024/04/30 08:10
Hashmat the brave warrior
Input: standard input
Output: standard output
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 his soldier number and the opponent's soldier number. From this 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. Input is terminated by 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 be in seperate line.
Sample Input:
10 1210 14
100 200
Sample Output:
24
100
#include <stdio.h>#include <stdlib.h>int main(){ long long m, n; while(~scanf("%lld%lld", &m, &n)){ if(m >= n) printf("%lld\n", m-n); else printf("%lld\n", n-m); } return 0;}
- UVa 10055 Hashmat the brave warrior(勇士)
- UVa OJ 10055-Hashmat the Brave Warrior
- UVa:10055 - Hashmat the Brave Warrior
- UVa 10055 Hashmat the brave warrior
- uva 10055 Hashmat the Brave Warrior
- UVA 10055 - Hashmat the Brave Warrior
- uva-10055 - Hashmat the Brave Warrior
- uva 10055 Hashmat the Brave Warrior
- UVa OJ 10055 - Hashmat the Brave Warrior
- UVa 10055 - Hashmat the Brave Warrior
- UVA 10055 Hashmat the brave warrior
- uva 10055 Hashmat the brave warrior
- UVa 10055 Hashmat the brave warrior
- UVA 10055 Hashmat the brave warrior
- UVA - 10055 - Hashmat the Brave Warrior
- uva 10055 - Hashmat the Brave Warrior
- UVA OJ: 10055 - Hashmat the Brave Warrior
- UVa 10055 - Hashmat the Brave Warrior
- C++ Templates FAQ
- base标签与a标签的href属性
- 去掉PowerDesigner生成SQL脚本中字段名带的引号
- 黑马程序员-AWT编程
- MySQL中select语句
- UVa 10055 Hashmat the brave warrior(勇士)
- java 父类子类静态成员,实例成员,构造函数初始化的顺序
- 多媒体函数简介
- 使用VS2008下调试SGI STL源码
- 【解决Win8系统磁盘占用100%的方法】
- VS2012开发PHP,Linux Server运行PHP,支持远程调试
- Android中解析XML
- hdu1301 Jungle Roads
- Java基于Socket文件传输示例