fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int x, s = 0;
  6. while(cin >> x)
  7. s += x;
  8. cout << s - x;
  9. }
Success #stdin #stdout 0.01s 5280KB
stdin
5 6 2 1 1
stdout
14