#include<bits/stdc++.h> usingnamespace std; intmain() { string a, b, c; int f = 0; cin >> a >> b; int as = a.size(); int bs = b.size(); if (a.size() > b.size()) { for (int i = 0; i < as - bs; i++) { b = "0" + b; } } else { for (int i = 0; i < bs - as; i++) { a = "0" + a; } } if (b > a) { f = 1; string s; s = b; b = a; a = s; } int flag = 0; for (int i = a.size() - 1; i >= 0; i--) { if (a[i] - flag < b[i]) { c = char(a[i] - flag - b[i] + 10 + '0') + c; flag = 1; } else { c = char(a[i] - flag - b[i] + '0') + c; flag = 0; } } if (f) { cout << "-"; } cout << c; }