设为首页 加入收藏

TOP

UVaOJ 10055 - Hashmat the Brave Warrior
2015-07-20 17:51:58 来源: 作者: 【 】 浏览:3
Tags:UVaOJ 10055 Hashmat the Brave Warrior

Problem A

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 12
10 14
100 200

Sample Output:

2
4
100
___________________________________________________________________________________

Shahriar Manzoor

哈哈,第一次做这上面的题,光荣的错了四次(不能用__int64,编译错误)

#include
  
   
#include
   
     #include
    
      #include
     
       #include
       #include
       
         #include
        
          #include
         
           #include
          
            //#define lll using namespace std; int main() { #ifdef lll freopen("C:\\Documents and Settings\\K70\\桌面\\cin.txt","r",stdin); freopen("C:\\Documents and Settings\\K70\\桌面\\out.txt","w",stdout); #endif long long a,b; while(cin>>a>>b) { if(b>a) cout<
           
            

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇HDU4719-Oh My Holy FFF(DP线段树.. 下一篇HDOJ 4968 Improving the GPA

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·Announcing October (2025-12-24 15:18:16)
·MySQL有什么推荐的学 (2025-12-24 15:18:13)
·到底应该用MySQL还是 (2025-12-24 15:18:11)
·进入Linux世界大门的 (2025-12-24 14:51:47)
·Download Linux | Li (2025-12-24 14:51:44)