fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. const int TEN = 10;
  5.  
  6. int main() {
  7. int a;
  8. cin >> a;
  9. int odd = 1;
  10. while (a > 0) {
  11. odd = 0;
  12. if (a % TEN < 4 || a % TEN % 2 != 0) {
  13. odd = 1;
  14. }
  15. a /= TEN;
  16. }
  17. if (odd == 0) {
  18. cout << "DA";
  19. } else {
  20. cout << "NU";
  21. }
  22. return 0;
  23. }
Success #stdin #stdout 0.01s 5232KB
stdin
10
stdout
NU