fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a, b;
  6. cin >> a >> b;
  7. if ((a * 2) > (b * 3)) {
  8. cout << a * 2;
  9. } else if ((a * 2) < (b * 3)) {
  10. cout << (b * 3) + (a * 2);
  11. } else {
  12. cout << "NECASTIGATOR!";
  13. }
  14. return 0;
  15. }
Success #stdin #stdout 0s 5304KB
stdin
6 4
stdout
NECASTIGATOR!