fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int a, b;
  7. cin>>a>>b;
  8. if((a-b)%10==9) cout<<(a-b)-1;
  9. else cout<<(a-b)+1;
  10. return 0;
  11. }
Success #stdin #stdout 0s 3300KB
stdin
5858 1234
stdout
4625