fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int price, money;
  6. cin >> price >> money;
  7. int flag = 1, counter = 0;
  8. while (counter <= price) {
  9. if (counter == price && money != 0) {
  10. flag = 0;
  11. }
  12. counter += 2;
  13. }
  14. if (flag == 0) {
  15. cout << "DA";
  16. } else {
  17. cout <<"NU";
  18. }
  19. return 0;
  20. }
Success #stdin #stdout 0.01s 5292KB
stdin
11 6
stdout
NU