fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. int h, d;
  6. cin >> h >>d;
  7.  
  8. int maxFall = 300;
  9. double fall= min(h, maxFall);
  10.  
  11. double horizontal = fall* 0.2;
  12.  
  13. if (h > maxFall )
  14. cout << "AIR";
  15. else if (horizontal == d)
  16. cout << "HIT";
  17. else
  18. cout << "MISS";
  19.  
  20. return 0;
  21. }
Success #stdin #stdout 0.01s 5320KB
stdin
500 100
stdout
AIR