Untitled
unknown
plain_text
a year ago
299 B
1
Indexable
Never
// 0; 0. #include <iostream> using namespace std; int main() { bool sz = false; int f; int e = 0; while (1) { cin >> f; e += f; if (f == 0 && sz == 1) { break; } if (f == 0 && sz == 0) { sz = 1; } if (f != 0) { sz = 0; } } cout << e; return 0; }