fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int main() {
  4. vector <int> a;
  5. int temp;
  6. while (cin >> temp) {
  7. a.push_back(temp);
  8. if (cin.get() == '\n') {
  9. break;
  10. }
  11. }
  12. for (int i = 0; i < a.size(); i++) {
  13. if (a[i] % 4 == 0) {
  14. cout << i + 1;
  15. }
  16. }
  17. return 0;
  18. }
Success #stdin #stdout 0.01s 5276KB
stdin
Standard input is empty
stdout
Standard output is empty