fork download
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. int main() {
  6. int a, b;
  7. cin>>a;
  8. cout<<abs(a/10 - a%10);
  9. return 0;
  10. }
Success #stdin #stdout 0s 5328KB
stdin
23
stdout
1