# 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`
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up