2015年3月30日 星期一

★1 10407Hashmat the brave warrior

題目資料:http://gpe.acm-icpc.tw/showproblemtab.php?probid=10407&cid=116
公式:無


程式碼:
//Created by Yuan_syun on 2015/3/29
#include <iostream>
#include <cstdlib>               //abs函數所需要呼叫的函式庫
int main()
{
using namespace std;
long x1,x2;           //輸入值必須為長整數

while (cin >> x1 >> x2)
{
cout << abs(x2 - x1) << endl;           //使用abs絕對值運算
}
return 0;
}

沒有留言:

張貼留言

歡迎指教或發問