fork download
  1. #include <iostream>
  2. using namespace std;
  3. int main() {
  4. int n, res = 0;
  5. cin >> n;
  6. for (int tmp, i = 0; i < n; i++) {
  7. cin >> tmp;
  8. res -= tmp;
  9. }
  10. for (int tmp, i = 0; i < n; i++) {
  11. cin >> tmp;
  12. res += tmp;
  13. }
  14. cout << res;
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0.01s 5632KB
stdin
Standard input is empty
stdout
Standard output is empty