fork(7) download
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. int main()
  5. {
  6. int a, b;
  7. std::cin >> std::hex >> a >> b;
  8. std::cout << std::hex << std::abs(b-a) << std::endl;
  9. }
Success #stdin #stdout 0s 2900KB
stdin
0002AE1
0002AE2
stdout
1