fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. const int TEN = 10;
  5.  
  6. int main() {
  7. int n, secondDigi;
  8. cin >> n;
  9. int lastDigi = n % TEN;
  10. n /= TEN;
  11. secondDigi = n % TEN;
  12. n /= TEN;
  13. if (n > (secondDigi - lastDigi) * 2) {
  14. cout << "DA";
  15. } else {
  16. cout << "NU";
  17. }
  18.  
  19. return 0;
  20. }
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
DA