# UVa 10055 ### 題目連結:[UVa10055](http://domen111.github.io/UVa-Easy-Viewer/?10055) ### 題述:每組測試資料1列,有2個整數,代表Hashmat及敵人的士兵數或反之。 #### 每組測試資料1列,有2個整數,代表Hashmat及敵人的士兵數或反之。這些數不會超過2^32^。 ### c++ code: ```cpp= #include <bits/stdc++.h> using namespace std; int main () { long long a , b ; while(cin >> a >> b ){ if(a > b) { cout << a-b << endl; } else { cout << b-a << endl; } } } ``` :::success **``sample input``** 10 12 14 10 100 200 ::: :::success **``sample output``** 2 4 100 ::: #### [返回首頁](https://hackmd.io/@fkleofk/APCS#10055) ###### tags: `APCS選修` `C++` `UVa`