fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. const int THOUSAND = 1000;
  5. const int SPECIAL_NUM = 111;
  6.  
  7. int main() {
  8. int n;
  9. cin >> n;
  10. if (n % THOUSAND == SPECIAL_NUM) {
  11. cout << "DA";
  12. } else {
  13. cout << "NU";
  14. }
  15. return 0;
  16. }
Success #stdin #stdout 0.01s 5260KB
stdin
9111
stdout
DA