fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a, b, c, d;
  6. cin >> a >> b >> c >> d;
  7. if (d % 2 != 0) {
  8. cout << 4 << " ";
  9. }
  10. if (c % 2 != 0) {
  11. cout << 3 << " ";
  12. }
  13. if (b % 2 != 0) {
  14. cout << 2 << " ";
  15. }
  16. if (a % 2 != 0) {
  17. cout << 1 << " ";
  18. }
  19. return 0;
  20. }
Success #stdin #stdout 0.01s 5284KB
stdin
53 22 31 124
stdout
3 1